600
|
I am using Layout property to sort multiple columns at once. The problem is that all items get expanded. How do I prevent that

OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "LinesAtRoot", -1);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "P1");
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", column)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(0) = True");
_ObjectSetProperty( column , "PartialCheck", -1);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "P2");
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(0) = True");
_ObjectSetProperty( column , "PartialCheck", -1);
_ObjectSetProperty( column , "FormatColumn", "1 index ``");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "Root");
_ObjectCallMethod( items , "InsertItem", h,"","Child A");
_ObjectCallMethod( items , "InsertItem", h,"","Child B");
_ObjectCallMethod( items , "InsertItem", h,"","Child A");
_ObjectCallMethod( items , "InsertItem", h,"","Child B");
_ObjectCallMethod( items , "AddItem", "Root");
_ObjectCallMethod( items , "AddItem", "Root");
_ObjectSetProperty( tree , "SingleSort", 0);
_ObjectSetProperty( tree , "Layout", "multiplesort=^"C0:1 C1:2^";collapse=^"^"");
_ObjectCallMethod( tree , "EndUpdate");
|
599
|
How can I get ride / hide the image being dragged by OLE Drag and Drop
// OLEStartDrag event - Occurs when the OLEDrag method is called.
FUNCTION treeEvents_OLEStartDrag(OBJECT tree, OBJECT Data, INT AllowedEffects)
' Data.SetData("data to drag")
AllowedEffects = 1;
END
OBJECT items,tree;
tree = ObjectByName("AN1") ;
ObjectAssociateEvents("treeEvents", tree);
_ObjectSetProperty( tree , "OLEDropMode", 1);
_ObjectCallMethod(tree, "ExecuteTemplate", "Background(34) = 16777215");
_ObjectSetProperty( tree , "LinesAtRoot", -1);
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Default");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "Root");
_ObjectCallMethod( items , "InsertItem", h,"","Child 1");
_ObjectCallMethod( items , "InsertItem", h,"","Child 2");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ExpandItem(h) = True");
|
598
|
How can I export checked items only

OBJECT columns,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "MarkSearchColumn", 0);
columns = _ObjectGetProperty( tree , "Columns");
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", columns)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Add(`C1`).Def(0) = True");
_ObjectSetProperty( _ObjectCallMethod( columns , "Add", "C2") , "FormatColumn", "1 index `A-Z`");
_ObjectSetProperty( _ObjectCallMethod( columns , "Add", "C3") , "FormatColumn", "100 index ``");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", "Item 1");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellState(AddItem(`Item 2`),0) = 1");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellState(AddItem(`Item 3`),0) = 1");
_ObjectCallMethod( tree , "EndUpdate");
Message( "Export CSV Checked Items Only:" );
Message( _ObjectCallMethod( tree , "Export", "","chk") );
|
597
|
How can I export a hidden column

OBJECT column,columns,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "MarkSearchColumn", 0);
columns = _ObjectGetProperty( tree , "Columns");
_ObjectCallMethod( columns , "Add", "C1");
column = _ObjectCallMethod( columns , "Add", "C2");
_ObjectSetProperty( column , "FormatColumn", "1 index `A-Z`");
_ObjectSetProperty( column , "Visible", 0);
column = _ObjectCallMethod( columns , "Add", "C3");
_ObjectSetProperty( column , "FormatColumn", "100 index ``");
_ObjectSetProperty( column , "Visible", 0);
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", "Item 1");
_ObjectCallMethod( items , "AddItem", "Item 2");
_ObjectCallMethod( items , "AddItem", "Item 3");
_ObjectCallMethod( tree , "EndUpdate");
Message( "Export CSV Hidden Columns (1,2):" );
Message( _ObjectCallMethod( tree , "Export", "","|1,2") );
|
596
|
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 3)

OBJECT column,columns,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "LinesAtRoot", -1);
_ObjectSetProperty( tree , "DrawGridLines", -2);
_ObjectSetProperty( tree , "AutoDrag", 3);
_ObjectSetProperty( tree , "HasLines", 1);
_ObjectSetProperty( tree , "Indent", 16);
_ObjectSetProperty( tree , "MarkSearchColumn", 0);
columns = _ObjectGetProperty( tree , "Columns");
column = _ObjectCallMethod( columns , "Add", "");
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", column)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(17) = 1");
_ObjectSetProperty( column , "FormatColumn", "((1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 + `` : (=:0 mid (1 + 1 + =:1) ) + `)` ) + ` ` + value");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "Root");
_ObjectCallMethod( items , "InsertItem", h,"","Child");
hChild = _ObjectCallMethod( items , "InsertItem", h,"","Child");
_ObjectCallMethod( items , "InsertItem", hChild,"","Child");
_ObjectCallMethod( items , "InsertItem", hChild,"","Child");
_ObjectCallMethod( items , "InsertItem", hChild,"","Child");
_ObjectCallMethod( items , "InsertItem", h,"","Child");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ExpandItem(0) = True");
h = _ObjectCallMethod( items , "AddItem", "Root");
_ObjectCallMethod( items , "InsertItem", h,"","Child");
hChild = _ObjectCallMethod( items , "InsertItem", h,"","Child");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,hChild")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", hChild)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellState(hChild,0) = 1");
_ObjectCallMethod( items , "InsertItem", hChild,"","Child");
_ObjectCallMethod( items , "InsertItem", hChild,"","Child");
_ObjectCallMethod( items , "InsertItem", hChild,"","Child");
_ObjectCallMethod( items , "InsertItem", h,"","Child");
_ObjectCallMethod( tree , "EndUpdate");
|
595
|
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 2)

OBJECT column,columns,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "LinesAtRoot", -1);
_ObjectSetProperty( tree , "GridLineColor", 12500670);
_ObjectSetProperty( tree , "DrawGridLines", -2);
_ObjectSetProperty( tree , "AutoDrag", 3);
_ObjectSetProperty( tree , "HasLines", 1);
_ObjectSetProperty( tree , "Indent", 16);
columns = _ObjectGetProperty( tree , "Columns");
_ObjectCallMethod( columns , "Add", "Default");
column = _ObjectCallMethod( columns , "Add", "");
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", column)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(17) = 1");
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(49) = 4");
_ObjectSetProperty( column , "AllowSizing", 0);
_ObjectSetProperty( column , "Width", 36);
_ObjectSetProperty( column , "Position", 0);
_ObjectSetProperty( column , "FormatColumn", "(1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 : (`............` left 2 * (=:0 count `.`)) + (=:0 mid (1 + 1 + =" +
":1) ) ");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "Root");
_ObjectCallMethod( items , "InsertItem", h,"","Child");
hChild = _ObjectCallMethod( items , "InsertItem", h,"","Child");
_ObjectCallMethod( items , "InsertItem", hChild,"","Child");
_ObjectCallMethod( items , "InsertItem", hChild,"","Child");
_ObjectCallMethod( items , "InsertItem", hChild,"","Child");
_ObjectCallMethod( items , "InsertItem", h,"","Child");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ExpandItem(0) = True");
h = _ObjectCallMethod( items , "AddItem", "Root");
_ObjectCallMethod( items , "InsertItem", h,"","Child");
hChild = _ObjectCallMethod( items , "InsertItem", h,"","Child");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,hChild")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", hChild)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellState(hChild,0) = 1");
_ObjectCallMethod( items , "InsertItem", hChild,"","Child");
_ObjectCallMethod( items , "InsertItem", hChild,"","Child");
_ObjectCallMethod( items , "InsertItem", hChild,"","Child");
_ObjectCallMethod( items , "InsertItem", h,"","Child");
_ObjectCallMethod( tree , "EndUpdate");
|
594
|
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 1)

OBJECT column,columns,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "LinesAtRoot", -1);
_ObjectSetProperty( tree , "DrawGridLines", -2);
_ObjectSetProperty( tree , "AutoDrag", 3);
_ObjectSetProperty( tree , "HasLines", 1);
_ObjectSetProperty( tree , "Indent", 16);
columns = _ObjectGetProperty( tree , "Columns");
_ObjectCallMethod( columns , "Add", "Default");
column = _ObjectCallMethod( columns , "Add", "");
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", column)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(17) = 1");
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(49) = 4");
_ObjectSetProperty( column , "Alignment", 2);
_ObjectSetProperty( column , "AllowSizing", 0);
_ObjectSetProperty( column , "Width", 24);
_ObjectSetProperty( column , "Position", 0);
_ObjectSetProperty( column , "FormatColumn", "(1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 : `<i>` + (=:0 mid (1 + 1 + =:1) ) ");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "Root");
_ObjectCallMethod( items , "InsertItem", h,"","Child");
hChild = _ObjectCallMethod( items , "InsertItem", h,"","Child");
_ObjectCallMethod( items , "InsertItem", hChild,"","Child");
_ObjectCallMethod( items , "InsertItem", hChild,"","Child");
_ObjectCallMethod( items , "InsertItem", hChild,"","Child");
_ObjectCallMethod( items , "InsertItem", h,"","Child");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ExpandItem(0) = True");
h = _ObjectCallMethod( items , "AddItem", "Root");
_ObjectCallMethod( items , "InsertItem", h,"","Child");
hChild = _ObjectCallMethod( items , "InsertItem", h,"","Child");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,hChild")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", hChild)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellState(hChild,0) = 1");
_ObjectCallMethod( items , "InsertItem", hChild,"","Child");
_ObjectCallMethod( items , "InsertItem", hChild,"","Child");
_ObjectCallMethod( items , "InsertItem", hChild,"","Child");
_ObjectCallMethod( items , "InsertItem", h,"","Child");
_ObjectCallMethod( tree , "EndUpdate");
|
593
|
Is it possible to have a different alignment for parts of the cell's caption

OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "TreeColumnIndex", -1);
_ObjectSetProperty( tree , "DrawGridLines", -2);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Default");
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", column)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(0) = True");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellHAlignment(AddItem(`all-left`),0) = 0");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellHAlignment(AddItem(`all-center`),0) = 1");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellHAlignment(AddItem(`all-right`),0) = 2");
h = _ObjectCallMethod( items , "AddItem", "left<c>center<r>right");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaptionFormat(h,0) = 1");
_ObjectCallMethod( tree , "EndUpdate");
|
592
|
I have a column with Def(exCellSingleLine) property on False, word-wrapping, and I am wondering if possible to update the column's content while user is resizing it
OBJECT column,columns,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
columns = _ObjectGetProperty( tree , "Columns");
column = _ObjectCallMethod( columns , "Add", "MultipleLine");
_ObjectSetProperty( column , "Width", 32);
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", column)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(16) = False");
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(64) = True");
column = _ObjectCallMethod( columns , "Add", "SingleLine");
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(16) = False");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`This is a bit of long text that should break the line`),1) = `This is a bit of long text that should break the line`");
_ObjectCallMethod( tree , "EndUpdate");
|
591
|
How do I sort the index column as numeric

// AddItem event - Occurs after a new Item has been inserted to Items collection.
FUNCTION treeEvents_AddItem(OBJECT tree, INT Item)
OBJECT items;
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,Item")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", Item)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellData(Item,1) = ItemToIndex(Item)");
END
OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
ObjectAssociateEvents("treeEvents", tree);
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "DrawGridLines", -1);
_ObjectSetProperty( tree , "ColumnAutoResize", -1);
_ObjectSetProperty( tree , "ShowFocusRect", 0);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Next");
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", column)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(48) = 4");
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(52) = 4");
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Index");
_ObjectSetProperty( column , "AllowSizing", 0);
_ObjectSetProperty( column , "Width", 48);
_ObjectSetProperty( column , "FormatColumn", "(((0 := (1 index ``)) mod 3) case ( default: ``; 0 : `<r><fgcolor=B0B0B0>`; 1: ``; 2 : `<c><fgcolor=808080>` )) + str(=:0)");
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(17) = 1");
_ObjectSetProperty( column , "SortType", 5);
_ObjectSetProperty( column , "Position", 0);
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", "Item 1");
_ObjectCallMethod( items , "AddItem", "Item 2");
_ObjectCallMethod( items , "AddItem", "Item 3");
_ObjectCallMethod( items , "AddItem", "Item 4");
_ObjectCallMethod( items , "AddItem", "Item 5");
_ObjectCallMethod( items , "AddItem", "Item 6");
_ObjectCallMethod( items , "AddItem", "Item 7");
_ObjectCallMethod( items , "AddItem", "Item 8");
_ObjectCallMethod( items , "AddItem", "Item 9");
_ObjectCallMethod( items , "AddItem", "Item 10");
_ObjectCallMethod( tree , "EndUpdate");
|
590
|
How can I put icons/images into buttons

OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "ColumnAutoResize", -1);
_ObjectCallMethod( tree , "Images", "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=");
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "C+B");
_ObjectSetProperty( column , "AllowSizing", 0);
_ObjectSetProperty( column , "Width", 48);
_ObjectSetProperty( column , "FormatColumn", "` <img>` + ( 1 + (1 index ``) mod 3 ) + `</img> `");
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", column)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(17) = 1");
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(0) = True");
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(2) = True");
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(3) = True");
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "");
_ObjectSetProperty( tree , "DrawGridLines", 2);
_ObjectSetProperty( tree , "DefaultItemHeight", 20);
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", "");
_ObjectCallMethod( items , "AddItem", "");
_ObjectCallMethod( items , "AddItem", "");
_ObjectCallMethod( items , "AddItem", "");
_ObjectCallMethod( items , "AddItem", "");
_ObjectCallMethod( items , "AddItem", "");
_ObjectCallMethod( items , "AddItem", "");
_ObjectCallMethod( items , "AddItem", "");
_ObjectCallMethod( tree , "EndUpdate");
|
589
|
Is it possible to have a CheckBox and Button TOGETHER on all cells in a column

// CellButtonClick event - Fired after the user clicks on the cell of button type.
FUNCTION treeEvents_CellButtonClick(OBJECT tree, INT Item, INT ColIndex)
Message( "CellButtonClick" );
Message( Item );
END
// CellStateChanged event - Fired after cell's state has been changed.
FUNCTION treeEvents_CellStateChanged(OBJECT tree, INT Item, INT ColIndex)
Message( "CellStateChanged" );
Message( Item );
END
OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
ObjectAssociateEvents("treeEvents", tree);
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "ColumnAutoResize", -1);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "");
_ObjectSetProperty( column , "AllowSizing", 0);
_ObjectSetProperty( column , "Width", 32);
_ObjectSetProperty( column , "FormatColumn", "1 index ``");
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Def");
_ObjectSetProperty( column , "AllowSizing", 0);
_ObjectSetProperty( column , "Width", 48);
_ObjectSetProperty( column , "FormatColumn", "` `");
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", column)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(0) = True");
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(2) = True");
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(3) = True");
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", "");
_ObjectCallMethod( items , "AddItem", "");
_ObjectCallMethod( items , "AddItem", "");
_ObjectCallMethod( items , "AddItem", "");
_ObjectCallMethod( items , "AddItem", "");
_ObjectCallMethod( items , "AddItem", "");
_ObjectCallMethod( items , "AddItem", "");
_ObjectCallMethod( items , "AddItem", "");
_ObjectCallMethod( tree , "EndUpdate");
|
588
|
Does filtering work with umlauts / accents characters
OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Names");
_ObjectSetProperty( column , "DisplayFilterButton", -1);
_ObjectSetProperty( column , "FilterType", 3);
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", "Mantel");
_ObjectCallMethod( items , "AddItem", "Mechanik");
_ObjectCallMethod( items , "AddItem", "Motor");
_ObjectCallMethod( items , "AddItem", "Murks");
_ObjectCallMethod( items , "AddItem", "Märchen");
_ObjectCallMethod( items , "AddItem", "Möhren");
_ObjectCallMethod( items , "AddItem", "Mühle");
_ObjectCallMethod( items , "AddItem", "Sérigraphie");
_ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Item(0).Filter = `*ä*`");
_ObjectCallMethod( tree , "ApplyFilter");
_ObjectCallMethod( tree , "EndUpdate");
|
587
|
The Items.FirstVisibleItem property is read-only. How can I change the first visible item

OBJECT column,rs,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "MarkSearchColumn", 0);
_ObjectSetProperty( tree , "ColumnAutoResize", 0);
_ObjectSetProperty( tree , "ContinueColumnScroll", 0);
rs = CreateObject("ADOR.Recordset");
_ObjectCallMethod( rs , "Open", "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb",3,3);
_ObjectSetProperty( tree , "DataSource", rs);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Pos");
_ObjectSetProperty( column , "Position", 0);
_ObjectSetProperty( column , "FormatColumn", "0 index ``");
_ObjectSetProperty( column , "Width", 32);
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", column)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(4) = 15790320");
_ObjectCallMethod(tree, "ExecuteTemplate", "ScrollPos(True) = 13");
_ObjectCallMethod( tree , "EndUpdate");
|
586
|
How FullPath method works

OBJECT items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "LinesAtRoot", -1);
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "C1");
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "C2");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "Root");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,1) = `A`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(InsertItem(h,,`Child 1`),1) = `B`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(InsertItem(h,,`Child 2`),1) = `C`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ExpandItem(h) = True");
_ObjectSetProperty( tree , "SearchColumnIndex", 1);
_ObjectCallMethod(tree, "TemplatePut", "Dim _ObObj")
_ObjectCallMethod(tree, "TemplatePut", _ObjectGetProperty( tree , "Items"))
Message( _ObjectGetProperty( tree , "SearchColumnIndex") );
Message( _ObjectCallMethod(tree, "ExecuteTemplate", "_ObObj.FullPath(ItemByIndex(2))") );
_ObjectSetProperty( tree , "SearchColumnIndex", 0);
Message( _ObjectGetProperty( tree , "SearchColumnIndex") );
Message( _ObjectCallMethod(tree, "ExecuteTemplate", "_ObObj.FullPath(ItemByIndex(2))") );
_ObjectCallMethod( tree , "EndUpdate");
|
585
|
How can I filter for multiple captions on a single column, using OR clause

OBJECT column,columns,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "ColumnAutoResize", -1);
_ObjectSetProperty( tree , "ContinueColumnScroll", 0);
_ObjectSetProperty( tree , "MarkSearchColumn", -1);
_ObjectSetProperty( tree , "SearchColumnIndex", 1);
_ObjectSetProperty( tree , "FilterBarPromptVisible", -1);
columns = _ObjectGetProperty( tree , "Columns");
_ObjectSetProperty( _ObjectCallMethod( columns , "Add", "Name") , "Width", 96);
column = _ObjectCallMethod( columns , "Add", "Title");
_ObjectSetProperty( column , "Width", 96);
_ObjectCallMethod( columns , "Add", "City");
items = _ObjectGetProperty( tree , "Items");
h0 = _ObjectCallMethod( items , "AddItem", "Nancy Davolio");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h0")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h0)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Sales Representative`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `Seattle`");
h0 = _ObjectCallMethod( items , "AddItem", "Andrew Fuller");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Vice President, Sales`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `Tacoma`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.SelectItem(h0) = True");
h0 = _ObjectCallMethod( items , "AddItem", "Janet Leverling");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Sales Representative`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `Kirkland`");
h0 = _ObjectCallMethod( items , "AddItem", "Margaret Peacock");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Sales Representative`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `Redmond`");
h0 = _ObjectCallMethod( items , "AddItem", "Steven Buchanan");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Sales Manager`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `London`");
h0 = _ObjectCallMethod( items , "AddItem", "Michael Suyama");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Sales Representative`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `London`");
h0 = _ObjectCallMethod( items , "AddItem", "Robert King");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Sales Representative`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `London`");
h0 = _ObjectCallMethod( items , "AddItem", "Laura Callahan");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Inside Sales Coordinator`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `Seattle`");
h0 = _ObjectCallMethod( items , "AddItem", "Anne Dodsworth");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Sales Representative`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `London`");
_ObjectSetProperty( tree , "FilterBarPromptColumns", "1");
_ObjectSetProperty( tree , "FilterBarPromptPattern", "Vice Inside");
_ObjectSetProperty( tree , "FilterBarPromptType", 2);
_ObjectCallMethod( tree , "EndUpdate");
|
584
|
How can I filter for multiple captions on a single column, using AND clause

OBJECT column,columns,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "ColumnAutoResize", -1);
_ObjectSetProperty( tree , "ContinueColumnScroll", 0);
_ObjectSetProperty( tree , "MarkSearchColumn", -1);
_ObjectSetProperty( tree , "SearchColumnIndex", 1);
_ObjectSetProperty( tree , "FilterBarPromptVisible", -1);
columns = _ObjectGetProperty( tree , "Columns");
_ObjectSetProperty( _ObjectCallMethod( columns , "Add", "Name") , "Width", 96);
column = _ObjectCallMethod( columns , "Add", "Title");
_ObjectSetProperty( column , "Width", 96);
_ObjectCallMethod( columns , "Add", "City");
items = _ObjectGetProperty( tree , "Items");
h0 = _ObjectCallMethod( items , "AddItem", "Nancy Davolio");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h0")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h0)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Sales Representative`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `Seattle`");
h0 = _ObjectCallMethod( items , "AddItem", "Andrew Fuller");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Vice President, Sales`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `Tacoma`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.SelectItem(h0) = True");
h0 = _ObjectCallMethod( items , "AddItem", "Janet Leverling");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Sales Representative`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `Kirkland`");
h0 = _ObjectCallMethod( items , "AddItem", "Margaret Peacock");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Sales Representative`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `Redmond`");
h0 = _ObjectCallMethod( items , "AddItem", "Steven Buchanan");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Sales Manager`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `London`");
h0 = _ObjectCallMethod( items , "AddItem", "Michael Suyama");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Sales Representative`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `London`");
h0 = _ObjectCallMethod( items , "AddItem", "Robert King");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Sales Representative`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `London`");
h0 = _ObjectCallMethod( items , "AddItem", "Laura Callahan");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Inside Sales Coordinator`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `Seattle`");
h0 = _ObjectCallMethod( items , "AddItem", "Anne Dodsworth");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Sales Representative`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `London`");
_ObjectSetProperty( tree , "FilterBarPromptColumns", "1");
_ObjectSetProperty( tree , "FilterBarPromptPattern", "Vice Sales");
_ObjectSetProperty( tree , "FilterBarPromptType", 1);
_ObjectCallMethod( tree , "EndUpdate");
|
583
|
Can I set the search box / filterbarprompt to invisible, so I can use my own input and *string* via VBA
OBJECT columns,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "ColumnAutoResize", -1);
_ObjectSetProperty( tree , "ContinueColumnScroll", 0);
_ObjectSetProperty( tree , "MarkSearchColumn", 0);
_ObjectSetProperty( tree , "SearchColumnIndex", 1);
_ObjectSetProperty( tree , "FilterBarHeight", 0);
_ObjectSetProperty( tree , "FilterBarPromptVisible", -1);
columns = _ObjectGetProperty( tree , "Columns");
_ObjectSetProperty( _ObjectCallMethod( columns , "Add", "Name") , "Width", 96);
_ObjectSetProperty( _ObjectCallMethod( columns , "Add", "Title") , "Width", 96);
_ObjectCallMethod( columns , "Add", "City");
items = _ObjectGetProperty( tree , "Items");
h0 = _ObjectCallMethod( items , "AddItem", "Nancy Davolio");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h0")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h0)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Sales Representative`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `Seattle`");
h0 = _ObjectCallMethod( items , "AddItem", "Andrew Fuller");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Vice President, Sales`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `Tacoma`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.SelectItem(h0) = True");
h0 = _ObjectCallMethod( items , "AddItem", "Janet Leverling");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Sales Representative`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `Kirkland`");
h0 = _ObjectCallMethod( items , "AddItem", "Margaret Peacock");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Sales Representative`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `Redmond`");
h0 = _ObjectCallMethod( items , "AddItem", "Steven Buchanan");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Sales Manager`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `London`");
h0 = _ObjectCallMethod( items , "AddItem", "Michael Suyama");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Sales Representative`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `London`");
h0 = _ObjectCallMethod( items , "AddItem", "Robert King");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Sales Representative`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `London`");
h0 = _ObjectCallMethod( items , "AddItem", "Laura Callahan");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Inside Sales Coordinator`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `Seattle`");
h0 = _ObjectCallMethod( items , "AddItem", "Anne Dodsworth");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,1) = `Sales Representative`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h0,2) = `London`");
_ObjectSetProperty( tree , "FilterBarPromptPattern", "London");
_ObjectCallMethod( tree , "EndUpdate");
|
582
|
How to load a hierarchy using the control's DataSource property (Parent-ID-Relation)

// AddItem event - Occurs after a new Item has been inserted to Items collection.
FUNCTION treeEvents_AddItem(OBJECT tree, INT Item)
OBJECT items;
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,Item")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", Item)
_ObjectCallMethod( items , "SetParent", Item,_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.FindItem(CellCaption(Item,`ReportsTo`),`EmployeeID`)"));
END
OBJECT rs,tree;
tree = ObjectByName("AN1") ;
ObjectAssociateEvents("treeEvents", tree);
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "LinesAtRoot", -1);
_ObjectSetProperty( tree , "ColumnAutoResize", 0);
_ObjectSetProperty( tree , "ContinueColumnScroll", 0);
rs = CreateObject("ADOR.Recordset");
_ObjectCallMethod( rs , "Open", "SELECT * FROM Employees ORDER BY ReportsTo","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb",3,3);
_ObjectSetProperty( tree , "DataSource", rs);
_ObjectCallMethod(tree, "ExecuteTemplate", "Items.ExpandItem(0) = True");
_ObjectCallMethod( tree , "EndUpdate");
|
581
|
Is there any option to control where I can drop the items when using the AutoDrag property
// AllowAutoDrag event - Occurs when the user drags the item between InsertA and InsertB as child of NewParent.
FUNCTION treeEvents_AllowAutoDrag(OBJECT tree, INT Item, INT NewParent, INT InsertA, INT InsertB, INT Cancel)
OBJECT items;
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,NewParent")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", NewParent)
Message( "NewParent" );
Message( _ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(NewParent,0)") );
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,InsertA")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", InsertA)
Message( "After" );
Message( _ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(InsertA,0)") );
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,InsertB")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", InsertB)
Message( "Before" );
Message( _ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(InsertB,0)") );
Cancel = -1;
END
OBJECT items,tree;
tree = ObjectByName("AN1") ;
ObjectAssociateEvents("treeEvents", tree);
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "AutoDrag", 3);
_ObjectSetProperty( tree , "LinesAtRoot", 0);
_ObjectSetProperty( tree , "HasLines", 2);
_ObjectSetProperty( tree , "ShowFocusRect", 0);
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Task");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "Group 1");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemDivider(h) = 0");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemBold(h) = True");
h1 = _ObjectCallMethod( items , "InsertItem", h,"","Task 1");
h2 = _ObjectCallMethod( items , "InsertItem", h,"","Task 2");
h3 = _ObjectCallMethod( items , "InsertItem", h,"","Task 3");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ExpandItem(h) = True");
h = _ObjectCallMethod( items , "AddItem", "Group 2");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemBold(h) = True");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemDivider(h) = 0");
_ObjectCallMethod( tree , "EndUpdate");
|
580
|
The FindPath is not case sensitive. How can I make it work case sensitive

OBJECT items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "LinesAtRoot", -1);
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Default");
_ObjectSetProperty( tree , "ASCIIUpper", "");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "L:");
_ObjectCallMethod( items , "InsertItem", h,"","test");
_ObjectCallMethod( items , "InsertItem", h,"","Test");
_ObjectCallMethod( items , "InsertItem", h,"","TEST");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ExpandItem(h) = True");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemBold(FindPath(`L:\TEST`)) = True");
_ObjectCallMethod( tree , "EndUpdate");
|
579
|
How do I enable / display a tooltip while user selects new items from the drop down filter panel

OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "LinesAtRoot", -1);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Items");
_ObjectSetProperty( column , "DisplayFilterButton", -1);
_ObjectSetProperty( column , "DisplayFilterPattern", 0);
_ObjectSetProperty( column , "FilterList", 13568);
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", "Item 1");
_ObjectCallMethod( items , "AddItem", "Item 2");
_ObjectCallMethod( items , "AddItem", "Item 3");
_ObjectCallMethod( items , "AddItem", "Item 4");
column = _ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Item(0)");
_ObjectSetProperty( column , "FilterType", 752);
_ObjectSetProperty( column , "Filter", "Item 1|Item 4");
_ObjectCallMethod( tree , "ApplyFilter");
_ObjectCallMethod( tree , "EndUpdate");
|
578
|
How can I align captions of items with checkbox, with items with no checkbox

OBJECT items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Default");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellImages(AddItem(0),0) = `1`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellHasCheckBox(AddItem(1),0) = True");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellImages(AddItem(2),0) = `1`");
_ObjectCallMethod( tree , "EndUpdate");
|
577
|
The control does not ensure the item to fit the control's client area once the user clicks the cell's button or check box. What can be done
// MouseDown event - Occurs when the user presses a mouse button.
FUNCTION treeEvents_MouseDown(OBJECT tree, INT Button, INT Shift, INT X, INT Y)
' Items.EnsureVisibleItem(ItemFromPoint(-1,-1,c,hit))
END
OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
ObjectAssociateEvents("treeEvents", tree);
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "TreeColumnIndex", -1);
_ObjectSetProperty( tree , "SelForeColor", _ObjectGetProperty( tree , "ForeColor"));
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Buttons");
_ObjectSetProperty( column , "Alignment", 1);
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", column)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(2) = True");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", "Button A");
_ObjectCallMethod( items , "AddItem", "Button B");
_ObjectCallMethod( items , "AddItem", "Button C");
_ObjectCallMethod( tree , "EndUpdate");
|
576
|
Does the title of the cell's tooltip supports HTML format

OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "");
_ObjectSetProperty( column , "Caption", "");
_ObjectSetProperty( column , "HTMLCaption", "Column");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellToolTip(AddItem(`tooltip w/h different title`),0) = `<c><b><fgcolor=FF0000>Title</fgcolor></b><br>This is bit of text that's shown when the user hovers the cell. This shows the title centered with a different color.`");
_ObjectCallMethod( tree , "EndUpdate");
|
575
|
How do I specify a different title for the cell's tooltip

OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "");
_ObjectSetProperty( column , "Caption", "This is the title");
_ObjectSetProperty( column , "HTMLCaption", "Column");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellToolTip(AddItem(`tooltip w/h different title`),0) = `This is bit of text that's shown when the user hovers the cell.`");
_ObjectCallMethod( tree , "EndUpdate");
|
574
|
The cell's tooltip displays the column's caption in its title. How can I get ride of that

OBJECT column,columns,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
columns = _ObjectGetProperty( tree , "Columns");
_ObjectCallMethod( columns , "Add", "C1");
_ObjectCallMethod( columns , "Add", "C2");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "tooltip w/h caption");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellToolTip(h,0) = `This is bit of text that's shown when the user hovers the cell. This shows the column's caption in the title.`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,1) = `tooltip no caption`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellToolTip(h,1) = `This is bit of text that's shown when the user hovers the cell. This shows no column's caption in the title.`");
column = _ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Item(`C2`)");
_ObjectSetProperty( column , "HTMLCaption", _ObjectGetProperty( column , "Caption"));
_ObjectSetProperty( column , "Caption", "");
_ObjectCallMethod( tree , "EndUpdate");
|
573
|
How can I programmatically show the column's filter

// RClick event - Fired when right mouse button is clicked
FUNCTION treeEvents_RClick()
_ObjectCallMethod(tree, "TemplatePut", "Dim c,hit")
_ObjectCallMethod(tree, "TemplatePut", c)
_ObjectCallMethod(tree, "TemplatePut", hit)
i = _ObjectCallMethod(tree, "ExecuteTemplate", "ItemFromPoint(-1,-1,c,hit)");
_ObjectCallMethod(tree, "TemplatePut", "Dim c")
_ObjectCallMethod(tree, "TemplatePut", c)
_ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Item(c).ShowFilter(`-1,-1,128,128`)");
END
OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
ObjectAssociateEvents("treeEvents", tree);
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "ShowFocusRect", 0);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Items ");
_ObjectSetProperty( column , "DisplayFilterPattern", 0);
_ObjectSetProperty( column , "FilterList", 9472);
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", "Item 1");
_ObjectCallMethod( items , "AddItem", "Item 2");
_ObjectCallMethod( items , "AddItem", "Item 3");
_ObjectCallMethod( tree , "EndUpdate");
|
572
|
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 2)

// ColumnClick event - Fired after the user clicks on column's header.
FUNCTION treeEvents_ColumnClick(OBJECT tree, OBJECT Column)
' Column.SortOrder = 1
_ObjectSetProperty( tree , "SortOnClick", -1);
_ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Item(`Sort`).SortOrder = 1");
_ObjectSetProperty( tree , "SortOnClick", 1);
END
OBJECT items,tree;
tree = ObjectByName("AN1") ;
ObjectAssociateEvents("treeEvents", tree);
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "MarkSearchColumn", 0);
_ObjectSetProperty( tree , "SortOnClick", 1);
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Items");
_ObjectSetProperty( _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Sort") , "Visible", 0);
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`Item 1 (3)`),1) = 3");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`Item 2 (1)`),1) = 1");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`Item 3 (2)`),1) = 2");
_ObjectCallMethod( tree , "EndUpdate");
|
571
|
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 1)

// ColumnClick event - Fired after the user clicks on column's header.
FUNCTION treeEvents_ColumnClick(OBJECT tree, OBJECT Column)
' Column.SortOrder = 1
_ObjectCallMethod( _ObjectGetProperty( tree , "Items") , "SortChildren", 0,"Sort",-1);
END
OBJECT items,tree;
tree = ObjectByName("AN1") ;
ObjectAssociateEvents("treeEvents", tree);
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "MarkSearchColumn", 0);
_ObjectSetProperty( tree , "SortOnClick", 1);
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Items");
_ObjectSetProperty( _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Sort") , "Visible", 0);
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`Item 1 (3)`),1) = 3");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`Item 2 (1)`),1) = 1");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`Item 3 (2)`),1) = 2");
_ObjectCallMethod( tree , "EndUpdate");
|
570
|
I have a 3 level hierarchy in the treeview, and I want to create a filter that only shows the items in the 2nd level of the hierarchy, is this possible

OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
_ObjectSetProperty( tree , "LinesAtRoot", -1);
_ObjectSetProperty( tree , "MarkSearchColumn", 0);
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Items");
_ObjectSetProperty( _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Level") , "Visible", 0);
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "Parent");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,1) = 0");
hChild = _ObjectCallMethod( items , "InsertItem", h,"","Child 1.1");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,hChild")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", hChild)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(hChild,1) = 1");
hSubChild = _ObjectCallMethod( items , "InsertItem", hChild,"","SubChild A");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,hSubChild")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", hSubChild)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(hSubChild,1) = 2");
hChild = _ObjectCallMethod( items , "InsertItem", h,"","Child 1.2");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,hChild")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", hChild)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(hChild,1) = 1");
hSubChild = _ObjectCallMethod( items , "InsertItem", hChild,"","SubChild B");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,hSubChild")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", hSubChild)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(hSubChild,1) = 2");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ExpandItem(h) = True");
_ObjectSetProperty( tree , "FilterInclude", 4);
column = _ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Item(`Level`)");
_ObjectSetProperty( column , "FilterType", 240);
_ObjectSetProperty( column , "Filter", 2);
_ObjectCallMethod( tree , "ApplyFilter");
|
569
|
How can I sort by two-columns, one by date and one by time

OBJECT column,columns,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "SingleSort", 0);
columns = _ObjectGetProperty( tree , "Columns");
_ObjectSetProperty( _ObjectCallMethod( columns , "Add", "Index") , "FormatColumn", "1 index ``");
_ObjectSetProperty( _ObjectCallMethod( columns , "Add", "Date") , "SortType", 2);
column = _ObjectCallMethod( columns , "Add", "Time");
_ObjectSetProperty( column , "SortType", 4);
_ObjectSetProperty( column , "FormatColumn", "time(value)");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", 0);
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,1) = #1/1/2001#");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,2) = #1/1/2001 10:00:00 AM#");
h = _ObjectCallMethod( items , "AddItem", 0);
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,1) = #12/31/2000#");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,2) = #1/1/2001 10:00:00 AM#");
h = _ObjectCallMethod( items , "AddItem", 0);
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,1) = #1/1/2001#");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,2) = #1/1/2001 6:00:00 AM#");
h = _ObjectCallMethod( items , "AddItem", 0);
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,1) = #12/31/2000#");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,2) = #1/1/2001 8:00:00 AM#");
h = _ObjectCallMethod( items , "AddItem", 0);
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,1) = #1/1/2001#");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,2) = #1/1/2001 8:00:00 AM#");
h = _ObjectCallMethod( items , "AddItem", 0);
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,1) = #12/31/2000#");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,2) = #1/1/2001 6:00:00 AM#");
_ObjectSetProperty( tree , "Layout", "multiplesort=^"C1:1 C2:1^"");
_ObjectCallMethod( tree , "EndUpdate");
|
568
|
We are using custom buttons for the +/- on the treeview control, is there a way to control the size of the image

OBJECT appearance,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
appearance = _ObjectGetProperty( tree , "VisualAppearance");
_ObjectCallMethod( appearance , "Add", 3,"gBFLBCJwBAEHhEJAAChABDEMACAADACAxRDQNABQKAAzQFAYbBkGqGAAGIYxYgmFgAQhFcZQSKUOQTDKMIziaQIRg8JYlDTJcIjKKEVQHFiXIrAKKwEgmEQMQiCcbzX" +
"IUBxAAqVZZFUaKAi+Qg4TLBAzUSAAYhtHqeJBjID4JA6UJXRpIAIQSSBUjGOg6TiMUYZAguAxCEzZUT0fAYUQSCC3ZzDCKoRpiCT7Xg8V5OVbjUz9P7AMBwLA7erxap6" +
"PJeD54QymGp/R5eMhyLI8UxXFqRY6veKtJhGDIrT5CEIQVA9EyXJqnahqOiaCguPorQy/dYYdg2BYBPS6MAvG4bVrOd59XrgN42fY2ByzAqlMQwS7rOqiY6YWTnehWTo" +
"HE+JZUmoLB5CufQuAkBYkGO+ZrDWAo7keZZyHmH5+i8X4bluaJyHgGB9mQHx3JjBpViqJRHmueZ7H8Xo3i2fYAl+d5tncMRfDcdZeDMDIjCCJwokoEoQiEJ4KCIfIdgU" +
"SZIAWaoGCEUh2BIJ4gnKBgMDICAnHoCggg0Aw4k0KAJkIagaguYwIj4LAmiKEw2CUIIiHMUJSDQSYyGCFYMGQCJCD0JRjiMRg3gmTYjGSVgmgkchSD4JJklIRIXCSSQY" +
"j4U4UgkQhGE+EwJEkJJWhGpgGGIOBNmMdhPg8SRiHCGAlibNhohqJpJi4T4ZA2WYIgEYInGOGJlDkCQyECDoTEkKQ+E+C5oCIVhQCUCQpnSDoeg4SZZH8YdhjibQ7AiU" +
"gkgcJFyiyEYmGmOhqhyJ5pmILoYCKaRSB6Eg7CcZgZggaRqHqNoTiuDpKkKMormsQ4xiUYgYiKEo6CCWgWiqPovloZoGjoKQYiQBCAg==");
_ObjectCallMethod( appearance , "Add", 4,"gBFLBCJwBAEHhEJAAChABDcMACAADACAxRDQNABQKAAzQFAYbBkGqGAAGIYxYgmFgAQhFcZQSKUOQTDKMIziaQIRg8JYlDTJcIjKKEVQHFiXIrAKKwEgmEQMQiCcbzX" +
"IUBxAAqVZZFUaKAi+Qg4TLBAzUSAAYhtHqeJBjID4JA6UJXRpIAIQSSBUjGOg6TiMUYZAguAxCEzZUT0fAYUQSCC3ZzDCKoRpiCT7Xg8V5OVbjUz9P7AMBwLA7erxap6" +
"PJeD54QymGp/R5eMhyLI8UxXFqRY6veKtJhGDIrT5CEIQVA9EyXJqnahqOiaCguPorQy/dYYdg2BYBPS6MAvG4bVrOd59XrgN42fY2ByzAqlMQwS7rOqiY6YWTnehWTo" +
"HE+JZUmoLB5CufQuAkBYkGO+ZrDWAo7keZZyHmPQ+g8X4fluYBhneEB9l0Iwpg6RRWiqFQfg+V5nnefh/GAB5yAIfRMFeRZdHeDJDCiSApkoMoEiQKBJmKCIfCcYQiHI" +
"FYFkmeBaBOA5JmgMIhgITICAmXoBkgIxAk4MxKAIcIaD+YpIjYLoLmMCI2CkJoiGMNgiCCIhDFCUg0EmMhghWDBkAkBg9CUY4jEYN4JA2IxklYJoJHIUg+CSZJSESFwk" +
"mUKRSFOFRlCIUIRhOZJCFISQ1iQdgEgGGJOBMeJdhOY5SFiHAmAkaYmG6GwmhmLhthsJJ5hSXYYkgFgKHgOYOFOEITCQCJpDSEoTmgQhUhOIRoHoGoCh+SJpnCZIeBed" +
"gaHgO4OlOMINCISByECDQikkGhuh2JwpmqBogCKaYiC6FwhmkQ4yHgYYYgaFopiuaRakCbIsisSpGjYOwaFYIYKCkK5CA2IRqiwCwFiYaBrkKEYKEAQCAgA==");
_ObjectCallMethod( appearance , "Add", 1,"CP:3 -4 -4 4 4");
_ObjectCallMethod( appearance , "Add", 2,"CP:4 -4 -4 4 4");
_ObjectSetProperty( tree , "DefaultItemHeight", 22);
_ObjectSetProperty( tree , "LinesAtRoot", 1);
_ObjectSetProperty( tree , "HasButtons", 4);
_ObjectCallMethod(tree, "ExecuteTemplate", "HasButtonsCustom(0) = 16777216");
_ObjectCallMethod(tree, "ExecuteTemplate", "HasButtonsCustom(1) = 33554432");
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Column");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "Root 1");
_ObjectCallMethod( items , "InsertItem", h,"","Child 1");
_ObjectCallMethod( items , "InsertItem", h,"","Child 2");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ExpandItem(h) = True");
h = _ObjectCallMethod( items , "AddItem", "Root 2");
_ObjectCallMethod( items , "InsertItem", h,"","Child");
_ObjectCallMethod( tree , "EndUpdate");
|
567
|
How can I connect to a DBF file
OBJECT rs,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "ColumnAutoResize", 0);
_ObjectSetProperty( tree , "ContinueColumnScroll", 0);
_ObjectSetProperty( tree , "MarkSearchColumn", 0);
rs = CreateObject("ADODB.Recordset");
_ObjectCallMethod( rs , "Open", "Select * From foxcode.DBF","Provider=vfpoledb;Data Source=C:\Program Files\Microsoft Visual FoxPro 9\",3,3);
_ObjectSetProperty( tree , "DataSource", rs);
_ObjectCallMethod( tree , "EndUpdate");
|
566
|
Do you have any Fit-To-Page options when printing the control

OBJECT createobject("exontrol.print"),rs,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "ColumnAutoResize", 0);
rs = CreateObject("ADOR.Recordset");
_ObjectCallMethod( rs , "Open", "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb",3,3);
_ObjectSetProperty( tree , "DataSource", rs);
_ObjectCallMethod( tree , "EndUpdate");
createobject("exontrol.print") = CreateObject("Exontrol.Print");
_ObjectSetProperty( createobject("exontrol.print") , "Options", "FitToPage = On");
_ObjectSetProperty( createobject("exontrol.print") , "PrintExt", tree);
_ObjectCallMethod( createobject("exontrol.print") , "Preview");
|
565
|
Does your control supports scrolling by touching the screen

OBJECT rs,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "ColumnAutoResize", 0);
rs = CreateObject("ADOR.Recordset");
_ObjectCallMethod( rs , "Open", "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb",3,3);
_ObjectSetProperty( tree , "DataSource", rs);
_ObjectSetProperty( tree , "AutoDrag", 4112);
_ObjectSetProperty( tree , "ScrollBySingleLine", -1);
_ObjectSetProperty( tree , "ContinueColumnScroll", -1);
_ObjectCallMethod( tree , "EndUpdate");
|
564
|
How do I prevent showing the control's BackColorAlternate property on empty / non-items part of the control

OBJECT items,tree;
tree = ObjectByName("AN1") ;
_ObjectSetProperty( tree , "BackColorAlternate", 2146496752);
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Column");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", "Item 1");
_ObjectCallMethod( items , "AddItem", "Item 2");
_ObjectCallMethod( items , "AddItem", "Item 3");
_ObjectCallMethod( items , "AddItem", "Item 4");
_ObjectCallMethod( items , "AddItem", "Item 5");
|
563
|
Is there a syntax for conditional formatting of items, based on CellState/CellStateChange

// CellStateChanged event - Fired after cell's state has been changed.
FUNCTION treeEvents_CellStateChanged(OBJECT tree, INT Item, INT ColIndex)
OBJECT items;
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,Item")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", Item)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(Item,2) = CellState(Item,0)");
END
OBJECT column,items,tree,var_conditionalformat;
tree = ObjectByName("AN1") ;
ObjectAssociateEvents("treeEvents", tree);
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "ShowFocusRect", 0);
_ObjectSetProperty( tree , "MarkSearchColumn", 0);
_ObjectSetProperty( tree , "SelBackMode", 1);
var_ConditionalFormat = _ObjectCallMethod( _ObjectGetProperty( tree , "ConditionalFormats") , "Add", "%2 != 0");
var_conditionalformat = var_ConditionalFormat;
_ObjectSetProperty( var_conditionalformat , "Bold", -1);
_ObjectSetProperty( var_conditionalformat , "ForeColor", 255);
_ObjectSetProperty( var_conditionalformat , "ApplyTo", -1);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "");
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", column)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(0) = True");
_ObjectSetProperty( column , "Width", 16);
_ObjectSetProperty( column , "AllowSizing", 0);
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Information");
_ObjectSetProperty( _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Hidden") , "Visible", 0);
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(``),1) = `This is a bit of text associated`");
h = _ObjectCallMethod( items , "AddItem", "");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,1) = `This is a bit of text associated`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellState(h,0) = 1");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(``),1) = `This is a bit of text associated`");
_ObjectCallMethod( tree , "EndUpdate");
|
562
|
How can I start editing the cell as soon as the user clicks a cell

// AfterCellEdit event - Occurs after data in the current cell is edited.
FUNCTION treeEvents_AfterCellEdit(OBJECT tree, INT Item, INT ColIndex, STRING NewCaption)
_ObjectCallMethod(tree, "TemplatePut", "Dim ColIndex,Item")
_ObjectCallMethod(tree, "TemplatePut", ColIndex)
_ObjectCallMethod(tree, "TemplatePut", Item)
_ObjectCallMethod(tree, "ExecuteTemplate", "Items.CellCaption(Item,ColIndex) = NewCaption");
END
// CancelCellEdit event - Occurs if the edit operation is canceled.
FUNCTION treeEvents_CancelCellEdit(OBJECT tree, INT Item, INT ColIndex, VARIANT Reserved)
_ObjectCallMethod(tree, "ExecuteTemplate", "Items.CellCaption(Item,ColIndex) = Reserved");
END
// Click event - Occurs when the user presses and then releases the left mouse button over the tree control.
FUNCTION treeEvents_Click()
OBJECT items;
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "Edit", _ObjectGetProperty( items , "FocusItem"),0);
END
OBJECT tree;
tree = ObjectByName("AN1") ;
ObjectAssociateEvents("treeEvents", tree);
_ObjectSetProperty( tree , "AllowEdit", -1);
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Column");
_ObjectCallMethod( _ObjectGetProperty( tree , "Items") , "AddItem", "Item 1");
_ObjectCallMethod( _ObjectGetProperty( tree , "Items") , "AddItem", "Item 2");
_ObjectCallMethod( _ObjectGetProperty( tree , "Items") , "AddItem", "");
|
561
|
How do I programmatically exclude items from the filter

OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "LinesAtRoot", -1);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Items");
_ObjectSetProperty( column , "DisplayFilterButton", -1);
_ObjectSetProperty( column , "DisplayFilterPattern", 0);
_ObjectSetProperty( column , "FilterList", 9472);
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", "Item 1");
_ObjectCallMethod( items , "AddItem", "Item 2");
_ObjectCallMethod( items , "AddItem", "Item 3");
_ObjectCallMethod( items , "AddItem", "Item 4");
column = _ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Item(0)");
_ObjectSetProperty( column , "FilterType", 752);
_ObjectSetProperty( column , "Filter", "Item 1|Item 4");
_ObjectCallMethod( tree , "ApplyFilter");
_ObjectCallMethod( tree , "EndUpdate");
|
560
|
How can I sort the columns to be displayed on the columns floating bar

OBJECT columns,tree;
tree = ObjectByName("AN1") ;
_ObjectSetProperty( tree , "ColumnAutoResize", 0);
columns = _ObjectGetProperty( tree , "Columns");
_ObjectSetProperty( _ObjectCallMethod( columns , "Add", "City") , "Visible", 0);
_ObjectSetProperty( _ObjectCallMethod( columns , "Add", "Start") , "Visible", 0);
_ObjectSetProperty( _ObjectCallMethod( columns , "Add", "End") , "Visible", 0);
_ObjectSetProperty( tree , "ColumnsFloatBarVisible", -1);
_ObjectSetProperty( tree , "ColumnsFloatBarSortOrder", 1);
|
559
|
How can I add a vertical padding

OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "DrawGridLines", -1);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Padding");
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", column)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(0) = True");
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(16) = False");
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(48) = 6");
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(49) = 6");
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(50) = 6");
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(51) = 6");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", "padding");
_ObjectCallMethod( items , "AddItem", "padding");
_ObjectCallMethod( tree , "EndUpdate");
|
558
|
Is the PutItems method running .AddItem event

// AddItem event - Occurs after a new Item has been inserted to Items collection.
FUNCTION treeEvents_AddItem(OBJECT tree, INT Item)
_ObjectCallMethod(tree, "TemplatePut", "Dim _ObObj,Item")
_ObjectCallMethod(tree, "TemplatePut", _ObjectGetProperty( tree , "Items"))
_ObjectCallMethod(tree, "TemplatePut", Item)
Message( "Adding ..." );
Message( _ObjectCallMethod(tree, "ExecuteTemplate", "_ObObj.CellCaption(Item,0)") );
END
OBJECT items,tree;
tree = ObjectByName("AN1") ;
ObjectAssociateEvents("treeEvents", tree);
_ObjectSetProperty( tree , "LinesAtRoot", -1);
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Def");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "Root");
_ObjectCallMethod( items , "InsertItem", h,"","Child 1");
_ObjectCallMethod( items , "InsertItem", h,"","Child 2");
Message( "Call PutItems" );
_ObjectCallMethod( tree , "PutItems", _ObjectCallMethod( tree , "GetItems", -1));
|
557
|
How do you embed HTML options into the anchor click string

// AnchorClick event - Occurs when an anchor element is clicked.
FUNCTION treeEvents_AnchorClick(OBJECT tree, STRING AnchorID, STRING Options)
Message( AnchorID );
Message( Options );
END
OBJECT columns,items,tree;
tree = ObjectByName("AN1") ;
ObjectAssociateEvents("treeEvents", tree);
_ObjectCallMethod( tree , "BeginUpdate");
columns = _ObjectGetProperty( tree , "Columns");
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", columns)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Add(`Car`).Def(17) = 1");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", "<a mazda_1;options for 1>Mazda <b>1</b></a>");
_ObjectCallMethod( items , "AddItem", "<a mazda_2;options for 2>Mazda <b>2</b></a>");
_ObjectCallMethod( items , "AddItem", "<a mazda_3;options for 3a>Mazda <b>3.a</b></a>");
_ObjectCallMethod( items , "AddItem", "<a mazda_3;options for 3b>Mazda <b>3.b</b></a>");
_ObjectCallMethod( tree , "EndUpdate");
|
556
|
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 3)

OBJECT items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectCallMethod( _ObjectGetProperty( tree , "VisualAppearance") , "Add", 1,"gBFLBCJwBAEHhEJAEGg4BVEIQAAYAQGKIYBkAKBQAGaAoDDMOQwQwAAxjGKEEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQCWIAzATGYBRfIUEgjBM6ExwG78e" +
"gBHp/ZpkACIJJAaRjHQdJxGKKMQB9DIhCZpeKhWgkKIJBzOEyBRC4ERBGqNGrsIgLEqWZpnWhaNpWXYTLyBN64LhuK46g53O6wLxvK6hEr2dJ/YBcIAOfghf4NQ7EMRx" +
"LC8Mw3BDvYDkOAABAIgI=");
_ObjectSetProperty( tree , "SelBackColor", 33554430);
_ObjectSetProperty( tree , "ShowFocusRect", 0);
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Items");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemBackColor(AddItem(`red`)) = 255");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemBackColor(AddItem(`blue`)) = 16711680");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemBackColor(AddItem(`green`)) = 65280");
_ObjectCallMethod( tree , "EndUpdate");
|
555
|
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 2)

OBJECT items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "SelBackMode", 1);
_ObjectSetProperty( tree , "ShowFocusRect", 0);
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Items");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemBackColor(AddItem(`red`)) = 255");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemBackColor(AddItem(`blue`)) = 16711680");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemBackColor(AddItem(`green`)) = 65280");
_ObjectCallMethod( tree , "EndUpdate");
|
554
|
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 1)

OBJECT items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "SelBackColor", _ObjectGetProperty( tree , "BackColor"));
_ObjectSetProperty( tree , "SelForeColor", _ObjectGetProperty( tree , "ForeColor"));
_ObjectSetProperty( tree , "ShowFocusRect", -1);
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Items");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemBackColor(AddItem(`red`)) = 255");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemBackColor(AddItem(`blue`)) = 16711680");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemBackColor(AddItem(`green`)) = 65280");
_ObjectCallMethod( tree , "EndUpdate");
|
553
|
How do I arrange my columns on multiple levels

OBJECT column,columns,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "ColumnAutoResize", 0);
_ObjectSetProperty( tree , "DrawGridLines", -1);
columns = _ObjectGetProperty( tree , "Columns");
column = _ObjectCallMethod( columns , "Add", "C0");
_ObjectSetProperty( column , "ExpandColumns", "1,2");
_ObjectSetProperty( column , "DisplayExpandButton", 0);
_ObjectCallMethod( columns , "Add", "C1");
_ObjectCallMethod( columns , "Add", "C2");
_ObjectCallMethod( columns , "Add", "C3");
column = _ObjectCallMethod( columns , "Add", "C4");
_ObjectSetProperty( column , "ExpandColumns", "5,6");
_ObjectSetProperty( column , "DisplayExpandButton", 0);
_ObjectCallMethod( columns , "Add", "C5");
column = _ObjectCallMethod( columns , "Add", "C6");
_ObjectSetProperty( column , "ExpandColumns", "6,7");
_ObjectSetProperty( column , "DisplayExpandButton", 0);
_ObjectCallMethod( columns , "Add", "C7");
_ObjectCallMethod( tree , "EndUpdate");
|
552
|
Does your control support expandable header or columns, so I can arrange it on multiple levels

OBJECT column,columns,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "DrawGridLines", -1);
_ObjectSetProperty( tree , "BackColorLevelHeader", 15790320);
columns = _ObjectGetProperty( tree , "Columns");
column = _ObjectCallMethod( columns , "Add", "Photo");
_ObjectSetProperty( column , "AllowSizing", 0);
_ObjectSetProperty( column , "Width", 32);
_ObjectCallMethod( columns , "Add", "Personal Info");
_ObjectCallMethod( columns , "Add", "Title");
_ObjectCallMethod( columns , "Add", "Name");
_ObjectCallMethod( columns , "Add", "First");
_ObjectCallMethod( columns , "Add", "Last");
_ObjectCallMethod( columns , "Add", "Address");
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", columns)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Item(`Personal Info`).ExpandColumns = `2,3`");
column = _ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Item(`Name`)");
_ObjectSetProperty( column , "ExpandColumns", "4,5");
_ObjectSetProperty( column , "Expanded", 0);
_ObjectCallMethod( tree , "EndUpdate");
|
551
|
Does your control support subscript or superscript, in HTML captions

OBJECT column,columns,items,tree;
tree = ObjectByName("AN1") ;
_ObjectSetProperty( tree , "ColumnAutoResize", 0);
_ObjectSetProperty( tree , "HeaderHeight", 28);
_ObjectSetProperty( tree , "DefaultItemHeight", 24);
columns = _ObjectGetProperty( tree , "Columns");
column = _ObjectCallMethod( columns , "Add", "Column 1");
_ObjectSetProperty( column , "HTMLCaption", "Column <b><off 2><font ;6>1");
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", column)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(17) = 1");
column = _ObjectCallMethod( columns , "Add", "Column 2");
_ObjectSetProperty( column , "HTMLCaption", "Column <b><off 2><font ;6>2");
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(17) = 1");
column = _ObjectCallMethod( columns , "Add", "Column 3");
_ObjectSetProperty( column , "HTMLCaption", "Column <b><off 2><font ;6>3");
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(17) = 1");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "Item <font ;6><off 4>1");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,1) = `Item <font ;6><off -6>2`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,2) = `Item <b><font ;6><off -6>2<off 4>3<off 4>1`");
|
550
|
Is there any property I can save and restore automatically the current setting, column position, size, and so on (2)

OBJECT items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Column");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", "Item 1");
_ObjectCallMethod( items , "AddItem", "Item 2");
_ObjectCallMethod( items , "AddItem", "Item 3");
_ObjectSetProperty( tree , "Layout", "Select=^"0^";SingleSort=^"C0:2^";Columns=1");
_ObjectCallMethod( tree , "EndUpdate");
|
549
|
Is there any property I can save and restore automatically the current setting, column position, size, and so on (1)

OBJECT items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Column");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", "Item 1");
_ObjectCallMethod( items , "AddItem", "Item 2");
_ObjectCallMethod( items , "AddItem", "Item 3");
_ObjectSetProperty( tree , "Layout", "gBjAAwAAuABmABpABsAB0ABlAByhoAPIAOEPAA9gYABoABQAgUEg0XN4AOcJicKkpujMbjsfkMFk0YhkQgUOjUEl8gjcGO0ok8KMULjEaGMcj08kQAO8oMkTNEtGwAG" +
"QAqc7gUlhh1ABtAEsk9GpEfhElgVcsMupNlnlonlaAFcr0shUsp8QPEtnVJqJhmcIhUMh0QiU5sYAqMngUSuEMw07k8Qv0SgVRrNEuVflF2jF5x9JyNEm0TjQijemyE0" +
"jE3t+YruauoAu4Az1qj9BzRn0UzksSnAA0xDjY6qnAw8OiUQ0dwzN0zWz2t7j8/xURAGNvWH6k8xlEhklhEI0O/6QAgI=");
_ObjectCallMethod( tree , "EndUpdate");
|
548
|
I have noticed that the column's header is changed once the cursor hovers it. Is it possible to change that visual appearance

OBJECT columns,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( _ObjectGetProperty( tree , "VisualAppearance") , "Add", 1,"c:\exontrol\images\normal.ebn");
columns = _ObjectGetProperty( tree , "Columns");
_ObjectCallMethod( columns , "Add", "Column 1");
_ObjectCallMethod( columns , "Add", "Column 2");
_ObjectSetProperty( tree , "BackColorHeader", 16777216);
_ObjectCallMethod(tree, "ExecuteTemplate", "Background(32) = 19760895");
|
547
|
Is it possible to change the visual appearance of the columns selector/floating bar(3)

OBJECT columns,tree;
tree = ObjectByName("AN1") ;
_ObjectSetProperty( tree , "ColumnAutoResize", 0);
columns = _ObjectGetProperty( tree , "Columns");
_ObjectCallMethod( columns , "Add", "Column 1");
_ObjectSetProperty( _ObjectCallMethod( columns , "Add", "Column 2") , "Visible", 0);
_ObjectCallMethod( _ObjectGetProperty( tree , "VisualAppearance") , "Add", 2,"c:\exontrol\images\normal.ebn");
_ObjectCallMethod( _ObjectGetProperty( tree , "VisualAppearance") , "Add", 3,"c:\exontrol\images\pushed.ebn");
_ObjectCallMethod(tree, "ExecuteTemplate", "Background(92) = 33554432");
_ObjectCallMethod(tree, "ExecuteTemplate", "Background(87) = 50331648");
_ObjectCallMethod(tree, "ExecuteTemplate", "Background(93) = 15791606");
_ObjectSetProperty( tree , "ColumnsFloatBarVisible", -1);
|
546
|
Is it possible to change the visual appearance of the columns selector/floating bar(2)

OBJECT columns,tree;
tree = ObjectByName("AN1") ;
_ObjectSetProperty( tree , "ColumnAutoResize", 0);
columns = _ObjectGetProperty( tree , "Columns");
_ObjectCallMethod( columns , "Add", "Column 1");
_ObjectSetProperty( _ObjectCallMethod( columns , "Add", "Column 2") , "Visible", 0);
_ObjectCallMethod( _ObjectGetProperty( tree , "VisualAppearance") , "Add", 3,"c:\exontrol\images\pushed.ebn");
_ObjectCallMethod(tree, "ExecuteTemplate", "Background(87) = 50331648");
_ObjectSetProperty( tree , "ColumnsFloatBarVisible", -1);
|
545
|
Is it possible to change the visual appearance of the columns selector/floating bar(1)

OBJECT tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( _ObjectGetProperty( tree , "VisualAppearance") , "Add", 2,"c:\exontrol\images\normal.ebn");
_ObjectCallMethod(tree, "ExecuteTemplate", "Background(92) = 33554432");
_ObjectCallMethod(tree, "ExecuteTemplate", "Background(87) = 15791606");
_ObjectCallMethod(tree, "ExecuteTemplate", "Background(93) = 15791606");
_ObjectSetProperty( tree , "ColumnsFloatBarVisible", -1);
|
544
|
I am using the ColumnsFloatBarVisible property on True, but still not able to add any column on that list

OBJECT columns,tree;
tree = ObjectByName("AN1") ;
_ObjectSetProperty( tree , "ColumnAutoResize", 0);
columns = _ObjectGetProperty( tree , "Columns");
_ObjectCallMethod( columns , "Add", "Column 1");
_ObjectSetProperty( _ObjectCallMethod( columns , "Add", "Column 2") , "Visible", 0);
_ObjectSetProperty( tree , "ColumnsFloatBarVisible", -1);
|
543
|
Is it possible to list a column to columns selector/floating bar, but still user can use it

OBJECT column,columns,tree;
tree = ObjectByName("AN1") ;
_ObjectSetProperty( tree , "ColumnAutoResize", 0);
columns = _ObjectGetProperty( tree , "Columns");
_ObjectCallMethod( columns , "Add", "Column 1");
_ObjectSetProperty( _ObjectCallMethod( columns , "Add", "Column 2") , "Visible", 0);
column = _ObjectCallMethod( columns , "Add", "Column 3");
_ObjectSetProperty( column , "Visible", 0);
_ObjectSetProperty( column , "Enabled", 0);
_ObjectSetProperty( tree , "ColumnsFloatBarVisible", -1);
|
542
|
How can I prevent a specific column not to be listed in the columns selector/floating bar

OBJECT column,columns,tree;
tree = ObjectByName("AN1") ;
_ObjectSetProperty( tree , "ColumnAutoResize", 0);
columns = _ObjectGetProperty( tree , "Columns");
_ObjectCallMethod( columns , "Add", "Column 1");
_ObjectSetProperty( _ObjectCallMethod( columns , "Add", "Column 2") , "Visible", 0);
column = _ObjectCallMethod( columns , "Add", "Column 3");
_ObjectSetProperty( column , "Visible", 0);
_ObjectSetProperty( column , "AllowDragging", 0);
_ObjectSetProperty( tree , "ColumnsFloatBarVisible", -1);
|
541
|
Is it possible to change the "Columns" caption being shown in the columns selector/floating bar

OBJECT columns,tree;
tree = ObjectByName("AN1") ;
_ObjectSetProperty( tree , "ColumnAutoResize", 0);
columns = _ObjectGetProperty( tree , "Columns");
_ObjectCallMethod( columns , "Add", "Column 1");
_ObjectSetProperty( _ObjectCallMethod( columns , "Add", "Column 2") , "Visible", 0);
_ObjectCallMethod(tree, "ExecuteTemplate", "Description(26) = `Hidden Columns`");
_ObjectSetProperty( tree , "ColumnsFloatBarVisible", -1);
|
540
|
How can I show the columns selector, so the user can drag and drop columns to the view

OBJECT columns,tree;
tree = ObjectByName("AN1") ;
_ObjectSetProperty( tree , "ColumnAutoResize", 0);
columns = _ObjectGetProperty( tree , "Columns");
_ObjectCallMethod( columns , "Add", "Column 1");
_ObjectSetProperty( _ObjectCallMethod( columns , "Add", "Column 2") , "Visible", 0);
_ObjectSetProperty( tree , "ColumnsFloatBarVisible", -1);
|
539
|
The column's header is changed while the cursor hovers it. Is it possible to prevent that

OBJECT columns,tree;
tree = ObjectByName("AN1") ;
columns = _ObjectGetProperty( tree , "Columns");
_ObjectCallMethod( columns , "Add", "Column 1");
_ObjectCallMethod( columns , "Add", "Column 2");
_ObjectCallMethod(tree, "ExecuteTemplate", "Background(32) = -1");
|
538
|
Is there any public method to export the selected data

OBJECT columns,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "MarkSearchColumn", 0);
columns = _ObjectGetProperty( tree , "Columns");
_ObjectCallMethod( columns , "Add", "C1");
_ObjectSetProperty( _ObjectCallMethod( columns , "Add", "C2") , "FormatColumn", "1 index `A-Z`");
_ObjectSetProperty( _ObjectCallMethod( columns , "Add", "C3") , "FormatColumn", "100 index ``");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", "Item 1");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.SelectItem(AddItem(`Item 2`)) = True");
_ObjectCallMethod( items , "AddItem", "Item 3");
_ObjectCallMethod( tree , "EndUpdate");
Message( "Export CSV Selected Items Only:" );
Message( _ObjectCallMethod( tree , "Export", "","sel") );
|
537
|
Is it possible to auto-numbering the children items but still keeps the position after filtering

OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "LinesAtRoot", -1);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Items");
_ObjectSetProperty( column , "DisplayFilterButton", -1);
_ObjectSetProperty( column , "FilterType", 240);
_ObjectSetProperty( column , "Filter", "Child 2");
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Pos.1");
_ObjectSetProperty( column , "FormatColumn", "1 ropos ''");
_ObjectSetProperty( column , "Position", 0);
_ObjectSetProperty( column , "Width", 32);
_ObjectSetProperty( column , "AllowSizing", 0);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Pos.2");
_ObjectSetProperty( column , "FormatColumn", "1 ropos ':'");
_ObjectSetProperty( column , "Position", 1);
_ObjectSetProperty( column , "Width", 32);
_ObjectSetProperty( column , "AllowSizing", 0);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Pos.3");
_ObjectSetProperty( column , "FormatColumn", "1 ropos ':|A-Z'");
_ObjectSetProperty( column , "Position", 2);
_ObjectSetProperty( column , "Width", 32);
_ObjectSetProperty( column , "AllowSizing", 0);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Pos.4");
_ObjectSetProperty( column , "FormatColumn", "1 ropos '|A-Z|'");
_ObjectSetProperty( column , "Position", 3);
_ObjectSetProperty( column , "Width", 32);
_ObjectSetProperty( column , "AllowSizing", 0);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Pos.5");
_ObjectSetProperty( column , "FormatColumn", "'<font Tahoma;7>' + 1 ropos '-<b>||A-Z'");
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", column)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(17) = 1");
_ObjectSetProperty( column , "Position", 4);
_ObjectSetProperty( column , "Width", 32);
_ObjectSetProperty( column , "AllowSizing", 0);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Pos.6");
_ObjectSetProperty( column , "FormatColumn", "'<b>'+ 1 ropos '</b>:<fgcolor=FF0000>|A-Z|'");
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(17) = 1");
_ObjectSetProperty( column , "Position", 5);
_ObjectSetProperty( column , "Width", 48);
_ObjectSetProperty( column , "AllowSizing", 0);
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "Root 1");
_ObjectCallMethod( items , "InsertItem", h,"","Child 1");
_ObjectCallMethod( items , "InsertItem", h,"","Child 2");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ExpandItem(h) = True");
h = _ObjectCallMethod( items , "AddItem", "Root 2");
_ObjectCallMethod( items , "InsertItem", h,"","Child 1");
_ObjectCallMethod( items , "InsertItem", h,"","Child 2");
_ObjectCallMethod( tree , "ApplyFilter");
_ObjectCallMethod( tree , "EndUpdate");
|
536
|
Is it possible to auto-numbering the children items too

OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "LinesAtRoot", -1);
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Items");
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Pos.1");
_ObjectSetProperty( column , "FormatColumn", "1 rpos ''");
_ObjectSetProperty( column , "Position", 0);
_ObjectSetProperty( column , "Width", 32);
_ObjectSetProperty( column , "AllowSizing", 0);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Pos.2");
_ObjectSetProperty( column , "FormatColumn", "1 rpos ':'");
_ObjectSetProperty( column , "Position", 1);
_ObjectSetProperty( column , "Width", 32);
_ObjectSetProperty( column , "AllowSizing", 0);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Pos.3");
_ObjectSetProperty( column , "FormatColumn", "1 rpos ':|A-Z'");
_ObjectSetProperty( column , "Position", 2);
_ObjectSetProperty( column , "Width", 32);
_ObjectSetProperty( column , "AllowSizing", 0);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Pos.4");
_ObjectSetProperty( column , "FormatColumn", "1 rpos '|A-Z|'");
_ObjectSetProperty( column , "Position", 3);
_ObjectSetProperty( column , "Width", 32);
_ObjectSetProperty( column , "AllowSizing", 0);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Pos.5");
_ObjectSetProperty( column , "FormatColumn", "'<font Tahoma;7>' + 1 rpos '-<b>||A-Z'");
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", column)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(17) = 1");
_ObjectSetProperty( column , "Position", 4);
_ObjectSetProperty( column , "Width", 32);
_ObjectSetProperty( column , "AllowSizing", 0);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Pos.6");
_ObjectSetProperty( column , "FormatColumn", "'<b>'+ 1 rpos '</b>:<fgcolor=FF0000>|A-Z|'");
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(17) = 1");
_ObjectSetProperty( column , "Position", 5);
_ObjectSetProperty( column , "Width", 48);
_ObjectSetProperty( column , "AllowSizing", 0);
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "Root 1");
_ObjectCallMethod( items , "InsertItem", h,"","Child 1");
_ObjectCallMethod( items , "InsertItem", h,"","Child 2");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ExpandItem(h) = True");
h = _ObjectCallMethod( items , "AddItem", "Root 2");
_ObjectCallMethod( items , "InsertItem", h,"","Child 1");
_ObjectCallMethod( items , "InsertItem", h,"","Child 2");
_ObjectCallMethod( tree , "EndUpdate");
|
535
|
How can I find if there is any filter applied to the control

// FilterChange event - Notifies your application that the filter is changed.
FUNCTION treeEvents_FilterChange()
Message( "If negative, the filter is present, else not" );
Message( _ObjectGetProperty( _ObjectGetProperty( tree , "Items") , "VisibleItemCount") );
END
OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
ObjectAssociateEvents("treeEvents", tree);
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "LinesAtRoot", -1);
_ObjectSetProperty( tree , "TreeColumnIndex", -1);
_ObjectSetProperty( tree , "FilterInclude", 4);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Column");
_ObjectSetProperty( column , "DisplayFilterButton", -1);
_ObjectSetProperty( column , "FilterType", 240);
_ObjectSetProperty( column , "Filter", "C1");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "R1");
_ObjectCallMethod( items , "InsertItem", h,"","C1");
_ObjectCallMethod( items , "InsertItem", h,"","C2");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ExpandItem(h) = True");
h = _ObjectCallMethod( items , "AddItem", "R2");
_ObjectCallMethod( items , "InsertItem", h,"","C1");
_ObjectCallMethod( items , "InsertItem", h,"","C2");
_ObjectCallMethod( tree , "ApplyFilter");
_ObjectCallMethod( tree , "EndUpdate");
|
534
|
How can I prevent showing the lines for the hierarchy while using the exMatchingItemsOnly option

OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "LinesAtRoot", -1);
_ObjectSetProperty( tree , "TreeColumnIndex", -1);
_ObjectSetProperty( tree , "FilterInclude", 4);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Column");
_ObjectSetProperty( column , "DisplayFilterButton", -1);
_ObjectSetProperty( column , "FilterType", 240);
_ObjectSetProperty( column , "Filter", "C1|C2");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "R1");
_ObjectCallMethod( items , "InsertItem", h,"","C1");
_ObjectCallMethod( items , "InsertItem", h,"","C2");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ExpandItem(h) = True");
h = _ObjectCallMethod( items , "AddItem", "R2");
_ObjectCallMethod( items , "InsertItem", h,"","C1");
_ObjectCallMethod( items , "InsertItem", h,"","C2");
_ObjectCallMethod( tree , "ApplyFilter");
_ObjectCallMethod( tree , "EndUpdate");
|
533
|
Is there any method to get only the matched items and not the items with his parent

OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "LinesAtRoot", -1);
_ObjectSetProperty( tree , "FilterInclude", 4);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Column");
_ObjectSetProperty( column , "DisplayFilterButton", -1);
_ObjectSetProperty( column , "FilterType", 240);
_ObjectSetProperty( column , "Filter", "C1|C2");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "R1");
_ObjectCallMethod( items , "InsertItem", h,"","C1");
_ObjectCallMethod( items , "InsertItem", h,"","C2");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ExpandItem(h) = True");
h = _ObjectCallMethod( items , "AddItem", "R2");
_ObjectCallMethod( items , "InsertItem", h,"","C1");
_ObjectCallMethod( items , "InsertItem", h,"","C2");
_ObjectCallMethod( tree , "ApplyFilter");
_ObjectCallMethod( tree , "EndUpdate");
|
532
|
How can I add or change the padding (spaces) for captions in the control's header

OBJECT column,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Add(`Padding-Left`).Def(52) = 18");
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Padding-Right");
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", column)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(53) = 18");
_ObjectSetProperty( column , "HeaderAlignment", 2);
_ObjectCallMethod( tree , "EndUpdate");
|
531
|
Do you have any plans to add cell spacing and cell padding to the cells

OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "DrawGridLines", -2);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Padding-Left");
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", column)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(0) = True");
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(48) = 18");
_ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Add(`No-Padding`).Def(0) = True");
_ObjectSetProperty( _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Empty") , "Position", 0);
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`Item A.1`),1) = `Item A.2`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`Item B.1`),1) = `Item B.2`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`Item C.1`),1) = `Item C.2`");
_ObjectCallMethod( tree , "EndUpdate");
|
530
|
Is it possible display numbers in the same format no matter of regional settings in the control panel

OBJECT items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Add(`Def`).Def(17) = 1");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", 100000.27);
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.FormatCell(h,0) = `(value format '') + ' <fgcolor=808080>(default positive)'`");
h = _ObjectCallMethod( items , "AddItem", 100000.27);
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.FormatCell(h,0) = `(value format '2|.|3|,|1|1')`");
h = _ObjectCallMethod( items , "AddItem", -100000.27);
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.FormatCell(h,0) = `(value format '') + ' <fgcolor=808080>(default negative)'`");
h = _ObjectCallMethod( items , "AddItem", -100000.27);
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.FormatCell(h,0) = `(value format '2|.|3|,|1|1')`");
_ObjectCallMethod( tree , "EndUpdate");
|
529
|
Is it possible to add a 0 for numbers less than 1 instead .7 to show 0.8

OBJECT items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Add(`Def`).Def(17) = 1");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", 0.27);
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.FormatCell(h,0) = `(value format '') + ' <fgcolor=808080>(default)'`");
h = _ObjectCallMethod( items , "AddItem", 0.27);
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.FormatCell(h,0) = `(value format '|||||0') + ' <fgcolor=808080>(Display no leading zeros)'`");
_ObjectCallMethod( tree , "EndUpdate");
|
528
|
How can I specify the format for negative numbers

OBJECT items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Add(`Def`).Def(17) = 1");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", -100000.27);
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.FormatCell(h,0) = `(value format '') + ' <fgcolor=808080>(default)'`");
h = _ObjectCallMethod( items , "AddItem", -100000.27);
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.FormatCell(h,0) = `(value format '||||1') + ' <fgcolor=808080>(Negative sign, number; for example, -1.1)'`");
_ObjectCallMethod( tree , "EndUpdate");
|
527
|
Is it possible to change the grouping character when display numbers

OBJECT items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Add(`Def`).Def(17) = 1");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", 100000.27);
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.FormatCell(h,0) = `(value format '') + ' <fgcolor=808080>(default)'`");
h = _ObjectCallMethod( items , "AddItem", 100000.27);
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.FormatCell(h,0) = `(value format '|||-') + ' <fgcolor=808080>(grouping character is -)'`");
_ObjectCallMethod( tree , "EndUpdate");
|
526
|
How can I display numbers with 2 digits in each group

OBJECT items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Add(`Def`).Def(17) = 1");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", 100000.27);
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.FormatCell(h,0) = `(value format '') + ' <fgcolor=808080>(default)'`");
h = _ObjectCallMethod( items , "AddItem", 100000.27);
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.FormatCell(h,0) = `(value format '||2') + ' <fgcolor=808080>(grouping by 2 digits)'`");
_ObjectCallMethod( tree , "EndUpdate");
|
525
|
How can I display my numbers using a different decimal separator

OBJECT items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Add(`Def`).Def(17) = 1");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", 100.27);
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.FormatCell(h,0) = `(value format '') + ' <fgcolor=808080>(default)'`");
h = _ObjectCallMethod( items , "AddItem", 100.27);
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.FormatCell(h,0) = `(value format '|;') + ' <fgcolor=808080>(decimal separator is <b>;</b>)'`");
_ObjectCallMethod( tree , "EndUpdate");
|
524
|
Is it possible to display the numbers using 3 (three) digits

OBJECT items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Add(`Def`).Def(17) = 1");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", 100.27);
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.FormatCell(h,0) = `(value format '') + ' <fgcolor=808080>(default)'`");
h = _ObjectCallMethod( items , "AddItem", 100.27);
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.FormatCell(h,0) = `(value format '3') + ' <fgcolor=808080>(3 digits)'`");
h = _ObjectCallMethod( items , "AddItem", 100.27);
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.FormatCell(h,0) = `(value format 2) + ' <fgcolor=808080>(2 digits)'`");
h = _ObjectCallMethod( items , "AddItem", 100.27);
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.FormatCell(h,0) = `(value format 1) + ' <fgcolor=808080>(1 digit)'`");
_ObjectCallMethod( tree , "EndUpdate");
|
523
|
Is it possible to format numbers

OBJECT column,columns,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "MarkSearchColumn", 0);
columns = _ObjectGetProperty( tree , "Columns");
_ObjectCallMethod( columns , "Add", "Name");
column = _ObjectCallMethod( columns , "Add", "A");
_ObjectSetProperty( column , "SortType", 1);
_ObjectSetProperty( column , "AllowSizing", 0);
_ObjectSetProperty( column , "Width", 36);
_ObjectSetProperty( column , "FormatColumn", "len(value) ? value + ' +'");
column = _ObjectCallMethod( columns , "Add", "B");
_ObjectSetProperty( column , "SortType", 1);
_ObjectSetProperty( column , "AllowSizing", 0);
_ObjectSetProperty( column , "Width", 36);
_ObjectSetProperty( column , "FormatColumn", "len(value) ? value + ' +'");
column = _ObjectCallMethod( columns , "Add", "C");
_ObjectSetProperty( column , "SortType", 1);
_ObjectSetProperty( column , "AllowSizing", 0);
_ObjectSetProperty( column , "Width", 36);
_ObjectSetProperty( column , "FormatColumn", "len(value) ? value + ' ='");
column = _ObjectCallMethod( columns , "Add", "A+B+C");
_ObjectSetProperty( column , "SortType", 1);
_ObjectSetProperty( column , "Width", 64);
_ObjectSetProperty( column , "ComputedField", "dbl(%1)+dbl(%2)+dbl(%3)");
_ObjectSetProperty( column , "FormatColumn", "type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=00" +
"00FF>+'+(value format '2|.|3|,' ): '0.00') )");
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", column)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(17) = 1");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "Root");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaptionFormat(h,4) = 2");
h1 = _ObjectCallMethod( items , "InsertItem", h,"","Child 1");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h1")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h1)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h1,1) = 7");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h1,2) = 3");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h1,3) = 1");
h1 = _ObjectCallMethod( items , "InsertItem", h,"","Child 2");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h1,1) = -2");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h1,2) = -2");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h1,3) = -4");
h1 = _ObjectCallMethod( items , "InsertItem", h,"","Child 3");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h1,1) = 2");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h1,2) = 2");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h1,3) = -4");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ExpandItem(h) = True");
_ObjectCallMethod( tree , "EndUpdate");
|
522
|
I am using the FormatColumn/FormatCell to format my columns. Is it possible to ignore the SelForeColor, so the foreground color for selected items does not override my settings

// SelectionChanged event - Fired after a new item has been selected.
FUNCTION treeEvents_SelectionChanged()
OBJECT items;
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "ClearItemBackColor", 0);
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemBackColor(SelectedItem(0)) = 16777088");
END
OBJECT column,columns,items,tree;
tree = ObjectByName("AN1") ;
ObjectAssociateEvents("treeEvents", tree);
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "MarkSearchColumn", 0);
_ObjectSetProperty( tree , "SelForeColor", _ObjectGetProperty( tree , "ForeColor"));
_ObjectSetProperty( tree , "SelBackColor", _ObjectGetProperty( tree , "BackColor"));
_ObjectSetProperty( tree , "ShowFocusRect", 0);
columns = _ObjectGetProperty( tree , "Columns");
column = _ObjectCallMethod( columns , "Add", "Format");
_ObjectSetProperty( column , "FormatColumn", "type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=00" +
"00FF>+'+(value format '2|.|3|,' ): '0.00') )");
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", column)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(17) = 1");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", 10);
_ObjectCallMethod( items , "AddItem", -8);
_ObjectCallMethod( tree , "EndUpdate");
|
521
|
Is it possible to change the height for all items at once

OBJECT items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "LinesAtRoot", -1);
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Items");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "Root 1");
_ObjectCallMethod( items , "InsertItem", h,"","Child 1");
_ObjectCallMethod( items , "InsertItem", h,"","Child 2");
h = _ObjectCallMethod( items , "AddItem", "Root 2");
_ObjectCallMethod( items , "InsertItem", h,"","Child 1");
_ObjectCallMethod( items , "InsertItem", h,"","Child 2");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ExpandItem(0) = True");
_ObjectCallMethod( tree , "EndUpdate");
_ObjectSetProperty( tree , "DefaultItemHeight", 12);
_ObjectCallMethod(tree, "ExecuteTemplate", "Items.ItemHeight(0) = 12");
|
520
|
How can I add a footer row

OBJECT items,tree;
tree = ObjectByName("AN1") ;
_ObjectSetProperty( tree , "ShowLockedItems", -1);
_ObjectSetProperty( tree , "DrawGridLines", 2);
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "C1");
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "C2");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.LockedItemCount(2) = 1");
h = _ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.LockedItem(2,0)");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemBackColor(h) = 8421504");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemForeColor(h) = 16777215");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,0) = `footer c1`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,1) = `footer c2`");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`cell`),1) = `cell`");
|
519
|
How can I add a header row

OBJECT items,tree;
tree = ObjectByName("AN1") ;
_ObjectSetProperty( tree , "ShowLockedItems", -1);
_ObjectSetProperty( tree , "DrawGridLines", 2);
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "C1");
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "C2");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.LockedItemCount(0) = 1");
h = _ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.LockedItem(0,0)");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemBackColor(h) = 8421504");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemForeColor(h) = 16777215");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,0) = `footer c1`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,1) = `footer c2`");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`cell`),1) = `cell`");
|
518
|
When I'm trying to show string with "line break" character (vbCrLF) in a textbox, it shows 2 squares. Is there any way to hide these squares

OBJECT column,columns,items,tree;
tree = ObjectByName("AN1") ;
columns = _ObjectGetProperty( tree , "Columns");
_ObjectCallMethod( columns , "Add", "Value");
column = _ObjectCallMethod( columns , "Add", "CellSingleLine = False");
_ObjectSetProperty( column , "ComputedField", "%0");
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", column)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(16) = False");
column = _ObjectCallMethod( columns , "Add", "FormatColumn/replace CRLF");
_ObjectSetProperty( column , "ComputedField", "%0");
_ObjectSetProperty( column , "FormatColumn", "value replace `\r\n` with ``");
column = _ObjectCallMethod( columns , "Add", "FormatColumn/replace TAB,CRLF");
_ObjectSetProperty( column , "ComputedField", "%0");
_ObjectSetProperty( column , "FormatColumn", "(value replace `\t` with ``) replace `\r\n` with ``");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", "a\ta\r\nb\tb");
|
517
|
Is there any way to "unselect" radio group

// DblClick event - Occurs when the user dblclk the left mouse button over an object.
FUNCTION treeEvents_DblClick(OBJECT tree, INT Shift, INT X, INT Y)
OBJECT items;
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
h = _ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellChecked(1234)");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellHasCheckBox(0,h) = True");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellState(0,h) = 0");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellHasCheckBox(0,h) = False");
END
// SelectionChanged event - Fired after a new item has been selected.
FUNCTION treeEvents_SelectionChanged()
OBJECT items;
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellState(FocusItem,0) = 1");
END
OBJECT items,tree;
tree = ObjectByName("AN1") ;
ObjectAssociateEvents("treeEvents", tree);
_ObjectSetProperty( tree , "MarkSearchColumn", 0);
_ObjectSetProperty( tree , "SelBackColor", 8454143);
_ObjectSetProperty( tree , "SelForeColor", 0);
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Default");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "Radio 1");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellHasRadioButton(h,0) = True");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellRadioGroup(h,0) = 1234");
h = _ObjectCallMethod( items , "AddItem", "Radio 2");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellHasRadioButton(h,0) = True");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellRadioGroup(h,0) = 1234");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellState(h,0) = 1");
h = _ObjectCallMethod( items , "AddItem", "Radio 3");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellHasRadioButton(h,0) = True");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellRadioGroup(h,0) = 1234");
|
516
|
The Column.Alignment property does not seem to work for cells with images in them. What can be done

OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectCallMethod( tree , "Images", "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=");
_ObjectSetProperty( tree , "TreeColumnIndex", -1);
_ObjectSetProperty( tree , "DrawGridLines", -1);
_ObjectSetProperty( tree , "HeaderHeight", 24);
_ObjectSetProperty( tree , "MarkSearchColumn", 0);
_ObjectSetProperty( tree , "DefaultItemHeight", 24);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Image");
_ObjectSetProperty( column , "AllowSizing", 0);
_ObjectSetProperty( column , "Width", 32);
_ObjectSetProperty( column , "HTMLCaption", "<img>1</img>");
_ObjectSetProperty( column , "HeaderAlignment", 1);
_ObjectSetProperty( column , "Alignment", 1);
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", column)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(17) = 1");
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Rest");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", "<img>1</img>");
_ObjectCallMethod( items , "AddItem", "<img>2</img>");
_ObjectCallMethod( items , "AddItem", "<img>3</img>");
_ObjectCallMethod( tree , "EndUpdate");
|
515
|
Can I change the format of date to be shown in the control

OBJECT column,columns,items,tree;
tree = ObjectByName("AN1") ;
columns = _ObjectGetProperty( tree , "Columns");
_ObjectCallMethod( columns , "Add", "Default");
column = _ObjectCallMethod( columns , "Add", "Format.1");
_ObjectSetProperty( column , "ComputedField", "%0");
_ObjectSetProperty( column , "FormatColumn", "dateF(value) replace `/` with `-`");
column = _ObjectCallMethod( columns , "Add", "Format.2");
_ObjectSetProperty( column , "ComputedField", "%0");
_ObjectCallMethod(tree, "TemplatePut", "Dim colObj")
_ObjectCallMethod(tree, "TemplatePut", column)
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(17) = 1");
_ObjectSetProperty( column , "FormatColumn", "`<b>`+ shortdate(value) + `</b> ` + timeF(value)");
column = _ObjectCallMethod( columns , "Add", "Format.3");
_ObjectSetProperty( column , "ComputedField", "%0");
_ObjectCallMethod(tree, "ExecuteTemplate", "colObj.Def(17) = 1");
_ObjectSetProperty( column , "FormatColumn", "( dateF(value) replace `/` with `-` ) + ` <b>`+ ( weekday(value) case ( 0 : `Su`; 1 : `Mo`; 2 : `Tu`; 3 : `We`; 4 : `Th`; 5 : `" +
"Fr`; 6 : `Sa`) )");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", "1/1/2001 10:00:00 AM");
_ObjectCallMethod( items , "AddItem", "1/2/2001 10:00:00 AM");
|
514
|
Is it possible to scroll the control's content by clicking and dragging

OBJECT rs,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "ColumnAutoResize", 0);
_ObjectSetProperty( tree , "ContinueColumnScroll", 0);
rs = CreateObject("ADOR.Recordset");
_ObjectCallMethod( rs , "Open", "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb",3,3);
_ObjectSetProperty( tree , "DataSource", rs);
_ObjectSetProperty( tree , "AutoDrag", 16);
_ObjectCallMethod( tree , "EndUpdate");
|
513
|
How can copy and paste the selection to Microsoft Word, any OLE compliant application, as a snapshot
OBJECT items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectCallMethod( _ObjectGetProperty( tree , "VisualAppearance") , "Add", 1,"c:\exontrol\images\normal.ebn");
_ObjectCallMethod(tree, "ExecuteTemplate", "HTMLPicture(`p1`) = `c:\exontrol\images\card.png`");
_ObjectCallMethod(tree, "ExecuteTemplate", "HTMLPicture(`p2`) = `c:\exontrol\images\sun.png`");
_ObjectSetProperty( tree , "AutoDrag", 11);
_ObjectSetProperty( tree , "LinesAtRoot", 0);
_ObjectSetProperty( tree , "HasLines", 2);
_ObjectSetProperty( tree , "ShowFocusRect", 0);
_ObjectSetProperty( tree , "DefaultItemHeight", 26);
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Task");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "<img>p1:32</img>Group 1");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaptionFormat(h,0) = 1");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemDivider(h) = 0");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemBold(h) = True");
h1 = _ObjectCallMethod( items , "InsertItem", h,"","Task 1");
h2 = _ObjectCallMethod( items , "InsertItem", h,"","Task 2");
h3 = _ObjectCallMethod( items , "InsertItem", h,"","Task 3");
h = _ObjectCallMethod( items , "AddItem", "<img>p2:32</img>Group 2");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaptionFormat(h,0) = 1");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemBold(h) = True");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemDivider(h) = 0");
h1 = _ObjectCallMethod( items , "InsertItem", h,"","Task");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ExpandItem(0) = True");
_ObjectCallMethod( tree , "EndUpdate");
|
512
|
How can copy and paste the selection to Microsoft Word, any OLE compliant application, as a image

OBJECT items,rs,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectCallMethod(tree, "ExecuteTemplate", "HTMLPicture(`p1`) = `c:\exontrol\images\card.png`");
_ObjectCallMethod(tree, "ExecuteTemplate", "HTMLPicture(`p2`) = `c:\exontrol\images\sun.png`");
var_HTMLPicture = _ObjectCallMethod(tree, "ExecuteTemplate", "HTMLPicture(`aka1`)");
_ObjectSetProperty( tree , "HeaderHeight", 24);
_ObjectSetProperty( tree , "DefaultItemHeight", 48);
_ObjectSetProperty( tree , "DrawGridLines", -2);
_ObjectSetProperty( tree , "GridLineColor", 15790320);
_ObjectSetProperty( tree , "SelBackMode", 1);
_ObjectSetProperty( tree , "ColumnAutoResize", 0);
_ObjectSetProperty( tree , "ContinueColumnScroll", 0);
rs = CreateObject("ADOR.Recordset");
_ObjectCallMethod( rs , "Open", "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb",3,3);
_ObjectSetProperty( tree , "DataSource", rs);
_ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Item(0).Def(17) = 1");
_ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Item(0).FormatColumn = `value + ` <img>p` + (1 + (value mod 3 ) ) + `</img>``");
_ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Item(0).Width = 112");
_ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Item(1).Def(0) = 1");
_ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Item(2).LevelKey = `1`");
_ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Item(3).LevelKey = `1`");
_ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Item(4).LevelKey = `1`");
_ObjectSetProperty( tree , "AutoDrag", 10);
_ObjectSetProperty( tree , "SingleSel", 0);
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
h = _ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemByIndex(1)");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.SelectItem(h) = True");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
h = _ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemByIndex(2)");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.SelectItem(h) = True");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
h = _ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemByIndex(3)");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.SelectItem(h) = True");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.LockedItemCount(2) = 1");
h = _ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.LockedItem(2,0)");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,1) = `<font ;16>Click the selection and <b>wait to start dragging</b>, and then drop to Microsoft Word, ...`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellSingleLine(h,1) = False");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaptionFormat(h,1) = 1");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellHAlignment(h,1) = 1");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemDivider(h) = 1");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemDividerLineAlignment(h) = 2");
_ObjectCallMethod( tree , "EndUpdate");
|
511
|
How can copy and paste the selection to Microsoft Word, Excel or any OLE compliant application, as a text

OBJECT items,rs,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "ColumnAutoResize", 0);
_ObjectSetProperty( tree , "ContinueColumnScroll", 0);
rs = CreateObject("ADOR.Recordset");
_ObjectCallMethod( rs , "Open", "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb",3,3);
_ObjectSetProperty( tree , "DataSource", rs);
_ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Item(2).LevelKey = `1`");
_ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Item(3).LevelKey = `1`");
_ObjectCallMethod(tree, "ExecuteTemplate", "Columns.Item(4).LevelKey = `1`");
_ObjectSetProperty( tree , "AutoDrag", 9);
_ObjectSetProperty( tree , "SingleSel", 0);
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
h = _ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemByIndex(1)");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.SelectItem(h) = True");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
h = _ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemByIndex(3)");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.SelectItem(h) = True");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
h = _ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemByIndex(4)");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.SelectItem(h) = True");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
h = _ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemByIndex(5)");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.SelectItem(h) = True");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.LockedItemCount(2) = 1");
h = _ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.LockedItem(2,0)");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,0) = `<font ;16>Click the selection and <b>wait to start dragging</b>, and then drop to Microsoft Word, Excel, ...`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellSingleLine(h,0) = False");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaptionFormat(h,0) = 1");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellHAlignment(h,0) = 1");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemDivider(h) = 0");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemDividerLineAlignment(h) = 2");
_ObjectCallMethod( tree , "EndUpdate");
|
510
|
Is it possible to change the indentation during the drag and drop

OBJECT items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectCallMethod( _ObjectGetProperty( tree , "VisualAppearance") , "Add", 1,"c:\exontrol\images\normal.ebn");
_ObjectSetProperty( tree , "AutoDrag", 3);
_ObjectSetProperty( tree , "LinesAtRoot", 0);
_ObjectSetProperty( tree , "HasLines", 1);
_ObjectSetProperty( tree , "HasButtons", 3);
_ObjectSetProperty( tree , "ShowFocusRect", 0);
_ObjectSetProperty( tree , "SelBackMode", 1);
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Task");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "Group 1");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemBold(h) = True");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemDivider(h) = 0");
h1 = _ObjectCallMethod( items , "InsertItem", h,"","Task 1");
h2 = _ObjectCallMethod( items , "InsertItem", h1,"","Task 2");
h2 = _ObjectCallMethod( items , "InsertItem", h1,"","Task 3");
h3 = _ObjectCallMethod( items , "InsertItem", h,"","Task 3");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ExpandItem(h) = True");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h1")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h1)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ExpandItem(h1) = True");
h = _ObjectCallMethod( items , "AddItem", "Group 2");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemBold(h) = True");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemDivider(h) = 0");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.LockedItemCount(2) = 1");
h = _ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.LockedItem(2,0)");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(h,0) = `Click a row, and move by dragging <b>up, down</b> to change the row's parent or <b>left,right</b> to increase or decrease the indentation.`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellSingleLine(h,0) = False");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaptionFormat(h,0) = 1");
_ObjectCallMethod( tree , "EndUpdate");
|
509
|
Is it possible to allow moving an item to another, but keeping its indentation

OBJECT items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectCallMethod( _ObjectGetProperty( tree , "VisualAppearance") , "Add", 1,"c:\exontrol\images\normal.ebn");
_ObjectSetProperty( tree , "AutoDrag", 2);
_ObjectSetProperty( tree , "LinesAtRoot", 0);
_ObjectSetProperty( tree , "HasLines", 2);
_ObjectSetProperty( tree , "ShowFocusRect", 0);
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Task");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "Group 1");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemDivider(h) = 0");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemBold(h) = True");
h1 = _ObjectCallMethod( items , "InsertItem", h,"","Task 1");
h2 = _ObjectCallMethod( items , "InsertItem", h,"","Task 2");
h3 = _ObjectCallMethod( items , "InsertItem", h,"","Task 3");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ExpandItem(h) = True");
h = _ObjectCallMethod( items , "AddItem", "Group 2");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemBold(h) = True");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ItemDivider(h) = 0");
_ObjectCallMethod( tree , "EndUpdate");
|
508
|
How can I change the row's position to another, by drag and drop. Is it possible

OBJECT items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "ShowFocusRect", 0);
_ObjectCallMethod( _ObjectGetProperty( tree , "VisualAppearance") , "Add", 1,"c:\exontrol\images\normal.ebn");
_ObjectSetProperty( tree , "AutoDrag", 1);
_ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Task");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", "Task 1");
_ObjectCallMethod( items , "AddItem", "Task 2");
_ObjectCallMethod( items , "AddItem", "Task 3");
_ObjectCallMethod( items , "AddItem", "Task 4");
_ObjectCallMethod( tree , "EndUpdate");
|
507
|
How do I enable the scrollbar-extension, as thumb to be shown outside of the control's client area

OBJECT tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "ScrollBars", 15);
_ObjectCallMethod(tree, "ExecuteTemplate", "ScrollPartVisible(0,65536) = True");
_ObjectCallMethod(tree, "ExecuteTemplate", "ScrollPartVisible(1,65536) = True");
_ObjectCallMethod(tree, "ExecuteTemplate", "ScrollPartVisible(2,65536) = True");
_ObjectSetProperty( tree , "ScrollWidth", 4);
_ObjectCallMethod(tree, "ExecuteTemplate", "Background(276) = 15790320");
_ObjectCallMethod(tree, "ExecuteTemplate", "Background(260) = 8421504");
_ObjectSetProperty( tree , "ScrollHeight", 4);
_ObjectCallMethod(tree, "ExecuteTemplate", "Background(404) = Background(276)");
_ObjectCallMethod(tree, "ExecuteTemplate", "Background(388) = Background(260)");
_ObjectCallMethod(tree, "ExecuteTemplate", "Background(511) = Background(276)");
_ObjectCallMethod( tree , "EndUpdate");
|
506
|
How can I have a case-insensitive filter (exFilterDoCaseSensitive flag is not set)

OBJECT column,columns,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "MarkSearchColumn", 0);
columns = _ObjectGetProperty( tree , "Columns");
column = _ObjectCallMethod( columns , "Add", "Car");
_ObjectSetProperty( column , "DisplayFilterButton", -1);
_ObjectSetProperty( column , "FilterType", 240);
_ObjectSetProperty( column , "Filter", "MAZDA");
column = _ObjectCallMethod( columns , "Add", "Equipment");
_ObjectSetProperty( column , "DisplayFilterButton", -1);
_ObjectSetProperty( column , "DisplayFilterPattern", 0);
_ObjectSetProperty( column , "CustomFilter", "Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*");
_ObjectSetProperty( column , "FilterType", 3);
_ObjectSetProperty( column , "Filter", "AIR BAG");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`Mazda`),1) = `Air Bag`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`Toyota`),1) = `Air Bag,Air condition`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`Ford`),1) = `Air condition`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`Nissan`),1) = `Air Bag,ABS,ESP`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`Mazda`),1) = `Air Bag, ABS,ESP`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`Mazda`),1) = `ABS,ESP`");
_ObjectCallMethod( tree , "ApplyFilter");
_ObjectCallMethod( tree , "EndUpdate");
|
505
|
How can I have a case-sensitive filter

OBJECT column,columns,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "MarkSearchColumn", 0);
columns = _ObjectGetProperty( tree , "Columns");
column = _ObjectCallMethod( columns , "Add", "Car");
_ObjectSetProperty( column , "DisplayFilterButton", -1);
_ObjectSetProperty( column , "FilterType", 496);
_ObjectSetProperty( column , "Filter", "Mazda");
column = _ObjectCallMethod( columns , "Add", "Equipment");
_ObjectSetProperty( column , "DisplayFilterButton", -1);
_ObjectSetProperty( column , "DisplayFilterPattern", 0);
_ObjectSetProperty( column , "CustomFilter", "Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*");
_ObjectSetProperty( column , "FilterType", 259);
_ObjectSetProperty( column , "Filter", "Air Bag");
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`Mazda`),1) = `Air Bag`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`Toyota`),1) = `Air Bag,Air condition`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`Ford`),1) = `Air condition`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`Nissan`),1) = `Air Bag,ABS,ESP`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`Mazda`),1) = `Air Bag, ABS,ESP`");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(AddItem(`Mazda`),1) = `ABS,ESP`");
_ObjectCallMethod( tree , "ApplyFilter");
_ObjectCallMethod( tree , "EndUpdate");
|
504
|
I have several columns, but noticed that the filter is using AND between columns, but I need OR clause for filtering. Is it possible

OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
_ObjectSetProperty( tree , "LinesAtRoot", -1);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Item");
_ObjectSetProperty( column , "DisplayFilterButton", -1);
_ObjectSetProperty( column , "DisplayFilterPattern", 0);
_ObjectSetProperty( column , "Filter", "Child 1");
_ObjectSetProperty( column , "FilterType", 240);
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Date");
_ObjectSetProperty( column , "DisplayFilterButton", -1);
_ObjectSetProperty( column , "DisplayFilterPattern", 0);
_ObjectSetProperty( column , "DisplayFilterDate", -1);
_ObjectSetProperty( column , "FilterList", 9474);
_ObjectSetProperty( column , "Filter", "12/28/2010");
_ObjectSetProperty( column , "FilterType", 4);
_ObjectSetProperty( tree , "FilterCriteria", "%0 or %1");
_ObjectCallMethod(tree, "ExecuteTemplate", "Description(23) = `<font ;18><fgcolor=FF0000>or</fgcolor></font>`");
_ObjectCallMethod(tree, "ExecuteTemplate", "Description(11) = `<font ;18><fgcolor=FF0000>and</fgcolor></font>`");
items = _ObjectGetProperty( tree , "Items");
h = _ObjectCallMethod( items , "AddItem", "Root 1");
_ObjectCallMethod(tree, "TemplatePut", "Dim iteObj,h")
_ObjectCallMethod(tree, "TemplatePut", items)
_ObjectCallMethod(tree, "TemplatePut", h)
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(InsertItem(h,,`Child 1`),1) = #12/27/2010#");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(InsertItem(h,,`Child 2`),1) = #12/28/2010#");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.ExpandItem(h) = True");
h = _ObjectCallMethod( items , "AddItem", "Root 2");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(InsertItem(h,,`Child 1`),1) = #12/29/2010#");
_ObjectCallMethod(tree, "ExecuteTemplate", "iteObj.CellCaption(InsertItem(h,,`Child 2`),1) = #12/30/2010#");
_ObjectCallMethod( tree , "ApplyFilter");
_ObjectCallMethod( tree , "EndUpdate");
|
503
|
Is it possible exclude the dates being selected in the drop down filter window

OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Date");
_ObjectSetProperty( column , "SortType", 2);
_ObjectSetProperty( column , "DisplayFilterButton", -1);
_ObjectSetProperty( column , "DisplayFilterPattern", 0);
_ObjectSetProperty( column , "DisplayFilterDate", -1);
_ObjectSetProperty( column , "FilterList", 9474);
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", "12/27/2010");
_ObjectCallMethod( items , "AddItem", "12/28/2010");
_ObjectCallMethod( items , "AddItem", "12/29/2010");
_ObjectCallMethod( items , "AddItem", "12/30/2010");
_ObjectCallMethod( items , "AddItem", "12/31/2010");
_ObjectCallMethod( tree , "EndUpdate");
|
502
|
How can I display a calendar control inside the drop down filter window

OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Date");
_ObjectSetProperty( column , "SortType", 2);
_ObjectSetProperty( column , "DisplayFilterButton", -1);
_ObjectSetProperty( column , "DisplayFilterPattern", 0);
_ObjectSetProperty( column , "DisplayFilterDate", -1);
_ObjectSetProperty( column , "FilterList", 1282);
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", "12/27/2010");
_ObjectCallMethod( items , "AddItem", "12/28/2010");
_ObjectCallMethod( items , "AddItem", "12/29/2010");
_ObjectCallMethod( items , "AddItem", "12/30/2010");
_ObjectCallMethod( items , "AddItem", "12/31/2010");
_ObjectCallMethod( tree , "EndUpdate");
|
501
|
Is it possible to include the dates as checkb-boxes in the drop down filter window

OBJECT column,items,tree;
tree = ObjectByName("AN1") ;
_ObjectCallMethod( tree , "BeginUpdate");
column = _ObjectCallMethod( _ObjectGetProperty( tree , "Columns") , "Add", "Dates");
_ObjectSetProperty( column , "SortType", 2);
_ObjectSetProperty( column , "DisplayFilterButton", -1);
_ObjectSetProperty( column , "DisplayFilterPattern", -1);
_ObjectSetProperty( column , "DisplayFilterDate", -1);
_ObjectSetProperty( column , "FilterList", 1280);
_ObjectSetProperty( column , "Filter", "to 12/27/2010");
_ObjectSetProperty( column , "FilterType", 4);
items = _ObjectGetProperty( tree , "Items");
_ObjectCallMethod( items , "AddItem", "12/27/2010");
_ObjectCallMethod( items , "AddItem", "12/28/2010");
_ObjectCallMethod( items , "AddItem", "12/29/2010");
_ObjectCallMethod( items , "AddItem", "12/30/2010");
_ObjectCallMethod( items , "AddItem", "12/31/2010");
_ObjectCallMethod( tree , "ApplyFilter");
_ObjectCallMethod( tree , "EndUpdate");
|